Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Added an example for importing a file
Browse files Browse the repository at this point in the history
  • Loading branch information
DemonExposer committed Aug 19, 2022
1 parent 9924a61 commit f1988f2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/importing/main.gsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
decl Math = require math

print(Math.abs(5) : " " : Math.abs(-5))
9 changes: 9 additions & 0 deletions examples/importing/math.gsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
function abs(num) {
on (num < 0) {
return (-num)
}

return (num)
}

export = {"abs": abs}

0 comments on commit f1988f2

Please sign in to comment.