Guardian Programmer's Guide

Table Of Contents
Communicating With a TACL Process
Guardian Programmer’s Guide 421922-014
8 - 15
Processing the Param Message
! Point to the first parameter:
@PTR := @MESSAGE[2] '<<'1;
! Set global value to false to indicate no P1 found yet:
PARAM1^PRESENT := 0;
! Loop for each parameter until P1 found:
FOR I := 1 TO NUMPAR DO
BEGIN
! If length and name match then P1 found:
IF PTR = 2 AND PTR[1] = "P1" THEN
BEGIN
! Advance the pointer to the value for P1:
! and save the value for P1 in the global PARAM1:
@PTR := @PTR '+' PTR '+' 1;
PARAM1 ':=' PTR[1] FOR PTR;
! Save the parameter length:
PARAM1^LEN := PTR;
! Set the PARAM1^PRESENT flag to true:
PARAM1^PRESENT := 1;
RETURN;
END;
! Skip the parameter name and parameter value
! then loop again to try the next parameter:
@PTR := @PTR '+' PTR '+' 1;
@PTR := @PTR '+' PTR '+' 1;
END;
END;
PROC INITIAL MAIN;
BEGIN
CALL INITIALIZER(!rucb!,
!passthru!,
!startupproc!,
PARAMS);
.
.
END;