11.07.2015 Views

BCL Programmers Manual V2.00 (PDF) - Barix

BCL Programmers Manual V2.00 (PDF) - Barix

BCL Programmers Manual V2.00 (PDF) - Barix

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4 Integers4.1 Integer constantsInteger constants (denoted N in this document) can be written as ordinary signed integers.They must be in the range from -2147483648 to +2147483647. They can be also written inhexadecimal notation using &H, eg. &H1A instead of 26.4.1 Integer variablesInteger variables are identified by their name (case insensitive), of which only the first fivecharacters are significant. Variable names must begin with a letter and can consist only ofalphanumerical characters and underscores. Integer variables can hold integers in the rangeallowed for integer constants.Integer variables can be assigned values using the assign operator = with syntaxV=Ewhere V is the name of the variable and E is an integer expression.Integer variables should be declared with the DIM command at the beginning of the programfor better code legibility. If DIM is omitted, variables are declared implicitly.Integer varibles are always initialized to 0 at startup (no matter if DIM is used or not).It's possible to declare multiple variables with one DIM command. Syntax of DIM is thefollowing:DIM NAME1[,NAME2[,NAME3...] ...]Example:DIM a,b,ca=17b=3*ac=b+54.2 Integer expressionsInteger expressions can be formed using the following operatorsInteger operators (descending priority of evaluation)() brackets+,- unary sign operator^exponentiation*,/,% multiplication, division, remainder(modulo)+,- addition, subtractionOperators can be applied to integer constants, integer variables and integer functions.4.3 Integer functionsFunctions returning integer values are called integer functions. Several built-in functions areavailable and it is also possible to create user defined functions, see section , page 27.<strong>Barix</strong> AG | 11/106

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!