pTAL Reference Manual (H06.03+)

Statements
HP pTAL Reference Manual523746-005
12-4
Assignment
Example 12-3 on page 12-4 calls PROCESS_DEBUG_ whenever a carry or overflow
condition occurs.
In Example 12-3 on page 12-4:
If you change the assertion-level from 5 to 15, you nullify the two ASSERT
statements that specify assert-level 10 and the LOCAL_CARRY_FLAG
condition.
If you change the assertion-level from 5 to 30, you nullify all the ASSERT
statements.
If all ASSERT statements that cover a particular condition have the same assert-
level, it is easier to nullify specific levels of ASSERT statements.
Assignment
The assignment statement assigns a value to a previously declared variable.
variable
is the identifier of a simple variable, array element, simple pointer, structure
pointer, or structure data item, with or without a bit deposit field and/or index. To
update a pointer’s content, prefix the pointer identifier with @.
Example 12-3. ASSERTION Directive and ASSERT Statement
?SOURCE $SYSTEM.SYSTEM.EXTDECS (PROCESS_DEBUG_)
?ASSERTION 5, PROCESS_DEBUG_ ! Activates all ASSERT conditions
SCAN array WHILE " " -> @pointer;
ASSERT 10 : LOCAL_CARRY_FLAG;
!Lots of code
ASSERT 10 : LOCAL_CARRY_FLAG;
!More code
ASSERT 20 : LOCAL_OVERFLOW_FLAG; ! $OVERFLOW routine tests for
! arithmetic overflow
variable := expression
VST012.vsd