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 displays a message box with "Hello World".
messagebox="Hello World"
The statements are executed, on by one, left to right and top to bottom, in the 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 does not ignore multiple spaces. Spaces and tabs are ignored only on the right and the left side.
Correct
setvar=a=5
setvar=a=6
WRONG:
setvar =a=5
setvar=a =5
setvar=a= 5
BeasScript has many keywords. But BeasScript does not include a syntax check. If you use the wrong keywords, the system will ignore it and continue with the next line.
Below you can find a small overview of keywords you will learn about in this tutorial:
Keyword |
Description |
---|---|
for |
Marks a block of statements to be executed, 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 |