Set

From Wiki
Jump to: navigation, search


Synopsis

[[set]] {{!namespaceVariable} | {%standardVariable} | {*persistantVariable} | {#systemVariable}} [expression] [abs]

Description

The set command, sets a varible to what an expression evaluates to. If the abs option is specified, the absolute (mathimatically) value will be assigned. Ommitting the expression will set the variable to a blank string.

Example

set %a 2
set %b $a ;we can use hexadecimal too
set %c ( %a * %b ) + 1 ;%c is 21
set %d %a * ( %b + 1 ) ;%d is 22
set %e %a * %b + 1 ;%e is 21
set %f ;set %f to a blank string
set %varname 0 ;initializing a variable to 0
halt


Note: Set is used to increment a variable by 1 by doing: set %varname %varname + 1


See Also

Miscellaneous

  • Miscellaneous commands
display Shows a message
execute Executes an external program
linesPerCycle Sets the execution speed
set sets a variable to a value (variable assignment)
send Sends a HTTP request to a server and runs the code that is returned
shutDown Shuts your computer down
sound Plays a wave file or the SystemDefault beep
str performs a operation on a string
tile retrieves information about tiles