BrightSign BrightScript 2 Reference Guide User Manual
Page 30

30
If the console you are printing to has the interface "ifTextField" then @ specifies exactly
where printing is to begin. For example:
print #m.text_field,@width*(height/2-1)+(width-len(msg$))/2,msg$;
Whenever you PRINT @ on the bottom line of the Display, there is an automatic line-
feed, causing everything displayed to move up one line. To suppress this, use a trailing
semi-colon at the end of the statement.
TAB (expression)
Moves the cursor to the specified position on the current line (modulo the width of your
console if you specify TAB positions greater than the console width). TAB may be used
several times in a PRINT list.
Example:
print tab(5)"tabbed 5";tab(25)"tabbed 25"
No punctuation is required after a TAB modifier. Numerical expressions may be used to
specify a TAB position. TAB cannot be used to move the cursor to the left. If the cursor
is beyond the specified position, the TAB is ignored.
POS(x)
Returns a number from 0 to window width, indicating the current cursor position on the
cursor. Requires a "dummy argument" (any numeric expression).
print tab(40) pos(0) „
prints 40 at position 40
print "these" tab(pos(0)+5)"words" tab(pos(0)+5)"are";
print tab(pos(0)+5)"evenly" tab(pos(0)+5)"spaced"
Function([parameter As Type, …]) As Type / End Function
A function is declared using the function statement. In parentheses, one or more
optional parameters to be passed may be declared. The return type of the function may
also be declared. If the parameter or return type are not declared, they are assumed to be
“dynamic”
Intrinsic types are passed by value (a copy is made). Objects are passed by reference.
Parameters can be of type:
Integer
Float
Double
String
Object