Hilmas User's Guide
Back Language Basics Next

Numeric expressions.

To do some arithmetic calculation in Hilmas can be used LET statement.

The syntax is:

LET var,(expression1),op,(expression2),op,(expression3),op,(expression4)....

where:

There are some limits in the use of this instruction:

For example:

LET   J,DDD,-,I,-,MBIS

is the same that in BASIC:   LET   J = DDD - I - MBIS

LET   GG,(DECIM,-,1),/,4,+,(36524,*,SEC),+,(SEC,/,4),+,(DECIM,*,365),+,DDD,+,CGG

If more than one level of parentheses should be required, the order of the operands must be changed to obtain only one level of parenthases.


Logical expressions.

Logical expressions are a combination of comparisons that produce a logical value: true or false. These expressions can be used only in control statements like IF, WHILE, REPEAT UNTIL and SELECT WHEN. Comparisons can be done between numbers of the same type or between strings; every conmparison can be combined with another using OR or AND logical operators. Generally speaking:

(var1,comp,var2),op,(var3,comp,var4),op,(var5,comp,var6)........

where:

Note that:

 

For example:

IF     (SYS,=,'DOS '),AND,(RECNUM,>,10)     THEN
    . . . . .

 

SELECT
WHEN      (STRING,=,'/F'),AND,(SYS,=,'MVS'),OR,(N,<=,M)
    . . . . .

 

WHILE     (RECPROC,=,NOMEPROC)     DO
    . . . . .

 


Back Start Next
Data move and Arrays Top Control structures