$TableC

From m204wiki
Revision as of 21:33, 7 November 2012 by DmeWiccan (talk | contribs) (1 revision)
Jump to navigation Jump to search

Information provided by TABLEC command

Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $TableC function, but you can achieve the same results by capturing the output of a TABLEC command execute in a Daemon request into a StringList.

This function allows retrieval of the information provided in the TABLEC command from a User Language program.

The $TableC function is callable.

Syntax

<section begin="syntax" />[%result =] $TableC(image_name, [file]) <section end="syntax" />

Syntax terms

%result A numeric variable to receive 0 or an error code.
image_name This required argument is a string identifying an image to receive returned data. This image should have the following format :

IMAGE TABLEC_IMAGE FILE_NAME IS STRING LEN 8 SLOTS_TOTAL IS BINARY LEN 4 SLOTS_USED IS BINARY LEN 4 SLOTS_PCT IS BINARY LEN 4 * FOLLOWING FIELDS SET TO ZERO FOR PRE-8.1 FILES PROP_COUNT IS BINARY LEN 4 PAGE_SPILL IS BINARY LEN 4 PROP_OVFL IS BINARY LEN 4 PROP_SPCT IS BINARY LEN 4 END IMAGE

See the Rocket Model 204 File Manager's Guide for more information on the data returned by $TableC.

file The name of the file on which the $TableC function should operate. If this argument is not specified, the default file at compilation time is used by $TableC.

Return codes

0 - Image filled with Table C information 4 - File invalid 8 - File not open 12 - Image specified by argument 1 not found 16 - Image specified by argument 1 not active or too short

Example

The following program prints the percentage of slots used in Table C of file ROSA.

B IMAGE JUNK FILE_NAME IS STRING LEN 8 ... END IMAGE PREPARE IMAGE JUNK %RC = $TableC('JUNK', 'ROSA') IF %RC ^= 0 THEN STOP END IF PRINT %JUNK:SLOTS_PCT END


Products authorizing $TableC