SPI Programming Manual (G06.24+, H06.03+, J06.03+)

SPI Programming in TACL
SPI Programming Manual427506-006
8-21
#SSGET
If l-token-id is either omitted or equal to ZSPI^VAL^NULL^TOKENCODE
and
index is either omitted or zero, then #SSGET returns the length of the
current occurrence of the current token.
If
l-token-id is a token map, this operation returns the length contained
within the specified token map; the actual value in the buffer can be longer or
shorter than this length. To get the actual length of the token value in the
buffer, call #SSGET with ZSPI^TKN^LEN, a token code made up of
ZSPI^TYP^STRUCT, and the token number from the token map. This returns
the length of the structure value, including 2 bytes for the length field. Then
subtract 2 from this value to get the length of the value itself.
ZSPI^TKN^NEXTCODE
directs #SSGET to return the next token code that is different from the current
token code, followed by the subsystem ID.
The subsystem ID returned in the expansion always has a version field of zero
(null).
The
index parameter has no effect on this operation, but if supplied, it must
be equal to zero.
ZSPI^TKN^NEXTTOKEN
directs #SSGET to return the very next token code, followed by the subsystem
ID. This operation differs from ZSPI^TKN^NEXTCODE in that it always returns
the token code of the next token, whether or not it is the same as that of the
current token, and whether or not the token is within a list. The operation
returns multiple occurrences of the same token code in the same order as they
were added to the buffer with #SSPUT or #SSPUTV.
The subsystem ID returned in the expansion always has a version field of zero
(null).
The
index and count parameters have no effect on this operation. However,
if
index is supplied, it must be equal to zero.
See the NOTE at the end of ZSPI^TKN^NEXTCODE
on page 8-21.
ZSPI^TKN^OFFSET o-token-id
directs #SSGET to return the byte offset of the token specified by the token
code or token map
o-token-id. The value returned is the offset from the
start of the buffer to the value associated with the specified token code and
index. (For variable-length values, the token value begins with the length word;
the offset given is the offset to that length word.)
Note. The special operations ZSPI^TKN^NEXTCODE and ZSPI^TKN^NEXTTOKEN return
only token codes. In particular, tokens added to the buffer by using #SSPUTV with a token
map are carried in the buffer with a token code of type ZSPI^TYP^STRUCT. The NEXTCODE
and NEXTTOKEN operations return this token code, not the token map used with #SSPUTV.