BEE has only one data structure - string, and one type of variables - array of strings. Strings are evaluated recursively to have variable values (those inside curly brackets) substituted with their values.
a = "Hello"; x = "a"; |
Command |
Output |
display ""; |
Hello |
display ""; |
a |
display "{}"; |
Hello |
Note: {} first evaluates to , then to "Hello" |
display "{} World"; |
Hello World |
See this in action |
Array elements are indexed by string as well, in the form of var:index. A variable by itself in fact means the element indexed by blank (the "default element").
y = "Hello"; y:am = "Good morning"; y:pm = "Good afternoon"; |
Command |
Output |
display ""; |
Hello |
display ""; |
Hello |
display ""; |
Good morning |
display ""; |
Good afternoon |
m = "am"; |
display " everyone"; |
Good morning everyone |
display "0=>''"; |
=>'Hello',am=>'Good morning',pm=>'Good afternoon' |
Note: The "|list" part is called "Conversion". The "list" conversion returns a representation of all elements of an array. |
See this in action | Back Next
|
Print
<= => < 1 2 3 4 5 6 >
|