SNAX/HLS Application Programming Manual

Data Structures
Customization
7–14 104707 Tandem Computers Incorporated
Accessing Storage The address of the structure allocated by your enabling routine is passed to the other
customization routines whenever they are called. The following fragment of code
demonstrates the correct usage:
STRUCT UserData(*);
BEGIN
INT varb1;
INT varb2;
...
END;
...
PROC SNAXHLS^USEREXIT^SNAX^OUT(wsadr,
sessid,
vbufr,
vlen);
INT(32) wsadr;
INT sessid;
STRING .EXT vbufr;
INT .EXT vlen;
BEGIN
STRING .EXT ud(UserData) := wsadr; ! (*)
...
ud.varb1 := 9;
ud.varb2 := ud.varb1;
END;
Note the line above marked with an *. This statement copies the contents of the
parameter wsadr into the pointer to the allocated user-data storage. Another way of
doing this is to include the following statement at the beginning of the procedure:
@ud := wsadr;