HTBasic Help
×
Menu
Index

Numeric Expression

 
A numeric expression is any legal combination of operands and operators joined together in such a way that the expression as a whole can be reduced to a numeric value. The following syntax diagram defines the legal combination of operands and operators. Precedence rules provide additional constraints on an expression (see Precedence). The syntax is:
numeric-expression =
   { + | - | NOT } numeric-expression |
   ( numeric-expression ) |
   numeric-expression operator numeric-expression |
   numeric-constant | numeric-name |
   numeric-array-element |
   numeric-function [ ( param [,param...] ) ] |
   FN function-name [ ( param [,param...] ) ] |
   string-expression compare-operator string-expression
Where:
operator = + | - | * | / | DIV | MOD | MODULO | ^ |
   AND | OR | EXOR | compare-operator
compare-operator =   <> | = | < | > | <= | >=
numeric-function = a function, like COS, which returns a numeric value.
param = legal parameters for numeric functions and user defined
   functions are explained in the Reference Manual.