Upper$ (string), Using val (string) wend – Xylem STORM 3 Basic Programming manual User Manual
Page 41

39
Commands and Functions
Marks the end of a conditional WHILE-WEND loop. END WHILE may also be used instead of
WEND.
x = 0
WHILE (x < 30)
REM Break out of the loop when our seconds are greater than 30
x = DATETIME(SECONDS)
WEND
Returns a number equivalent for the given string. Whitespace is ignored. See STR$( ) for converting
a number to a string
.
var = VAL(“26.250”) REM sets var to 26.250
var = VAL(“ 22 “)
REM sets var to 22
Returns the given string as all uppercase
.
var$ =UPPER$(“a1,b2,c3,d4”) REM sets var$ to A1,B2,C3,D4
UPPER$ (string)
Used with the PRINT statement to specify the format of the given number. Format is specified
using hashes (“#”). If more hashes are provided than needed, the beginning is space-filledand the
end zero-padded. If not enough hashes are given before the decimal, the hash format is returned.
var = 128.265
OPEN “SiteID.csv” FOR WRITING AS #2
PRINT #2, var USING “####.###”
REM prints 128.265
PRINT #2, var USING “###.####”
REM prints 128.2650
PRINT #2, var USING “###.##”
REM prints 128.26
PRINT #2, var USING “##.##”
REM prints ##.##
PRINT #2, var USING “###”
REM prints 128
CLOSE #2
USING
VAL (string)
WEND