Euler, Exp (number), Flush – Xylem STORM 3 Basic Programming manual User Manual

Page 19: False, Floor

Advertising
background image

17

Commands and Functions

A read-only constant containing the number 2.7182818284590452.

var = EULER REM sets var to the euler constant

EULER

Returnseuler raised to the power of the given number. Identical to EULER^number.

var = EXP(0) REM sets var to 1, equivalent to EULER^0

var = EXP(1) REM sets var to 2.71828, equivalent to EULER^1

var = EULER^2 REM sets var to 7.38906, equivalent to EXP(2)

EXP (number)

For files, writes any remaining unwritten (buffered) data to the specified file. For serial connections,

removes any extra data on the given line. Closing a file or serial connection causes an automatic

flush to occur.

OPEN “RS-232 COM” AS #2

INPUT #2, a$ REM retrieves from RS-232 COM and stores in string a$

PRINT #2 “a1”

FLUSH #2

INPUT #2, b$ REM retrieves from RS-232 COM and stores in string b$

CLOSE #2

val1 = 12.5

val2 = 32.6

OPEN “SiteID.csv” FOR WRITING AS #1

PRINT #1, “Appened values: “

FLUSH #1

PRINT #1, val1, “,”, val2

CLOSE #1

FLUSH

A read-only constant containing the number 0.


var = DATETIME(MINUTES)

top_of_hour = FALSE

IF (var ==0) THEN

top_of_hour = TRUE

ENDIF

FALSE

Returns the floor or largest integer not greater than the given number.

var = FLOOR(1.2) REM sets var to 1

var = FLOOR(4.7) REM sets var to 4

FLOOR

Advertising