RosettaCodeData/Task/Variables/EasyLang/variables.easy

24 lines
368 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
# it is statically typed
#
# global number variable
n = 99
print n
# global array of numbers
a[] = [ 2.1 3.14 3 ]
#
proc foo . .
# i is local, because it is first used in the function
for i = 1 to len a[]
print a[i]
.
.
2023-09-16 17:28:03 -07:00
foo
2023-07-01 11:58:00 -04:00
#
# string
domain$ = "easylang.dev"
print domain$
#
# array of strings
fruits$[] = [ "apple" "banana" "orange" ]
print fruits$[]