In Petit Computer BASIC, there is no keyword for assignment. The command to assign a value to a variable has the form:
variablename = expression
The expression
gets evaluated, and the resulting value is assigned to the variable variablename
. (This is in contrast to many variants of BASIC, where the same command would look like LET variablename = expression
.)
Note that the single
=
sign always means assignment in Petit Computer BASIC. To test whether two expressions are equal to each other, use the relational operator ==.