A computer program is a list of "instructions" to be "executed" by a computer
In a programming language, these programming instructions are called statements
A BeasScript program is a list of programing statements
BeasScript statements are composed of
Values, Operators, Expression, Keywords and comments
This statement display a message box with "Hello World"
messagebox="Hello World"
The statements are executed, on by one, left to right and top to bottom, in same order as they are written.
LineFeed separate BeasScript statements
Add a semicolon at the end of each executable statement:
// assign the value 5 to a
setvar=a=5
// assign the value 10 to b
setvar=b=10
// display value from a, in this case "5"
messagebox=<a>
Beas Script don't ignores multiple spaces. Only on right and left side spaces and tabs ignored
Correct
setvar=a=5
setvar=a=6
WRONG:
setvar =a=5
setvar=a =5
setvar=a= 5
Beas Script has many keyword. But Beas Script don't have syntax check. If you use wrong keywords, the system will ignore it and continue with next line.
Here a small overview of keywords you will learn about in this tutorial:
Keyword |
Description |
for |
Marks a block of statements to be exectued, as long as a condition is true |
if ... else |
marks a block of statements to be executed, depending on a condition |
return |
Exists a function |
setvar |
Declares a variable |
messagebox |
Display message box |