This procedure returns the following information for a designated ccsversion:
-
The number of the base coded character set to which the ccsversion applies
-
The escapement information
-
The space characters used for the ccsversion
-
The array sizes required by the ccsversion translate tables and sets
Example
This example calls the procedure VSNINFO to get information about the system default ccsversion. For this example assume the system default ccsversion in Norway (71).
BEGIN
$ INCLUDE INTL="SYMBOL/INTL/ALGOL/PROPERTIES." 10000000 - 49999999
FILE OUT(KIND=DISK,UNITS=CHARACTERS,FILEUSE=IO,FILETYPE=0,NEWFILE,
MAXRECSIZE=80,TITLE="OUT/ALGOL/VSNINFO.");
ARRAY VSN_ARY[0:7]
,LINEOUT[0:14];
INTEGER VSN_NUM
,I
,RESULT;
FORMAT FORM1(A31,T41,A10,T55,J2)
,FORM2(" SPACE CHARACTER[",I1,"] (HEX)",T41,A5,J2,A3,T55,H2);
VSN_NUM := CS_VSN_NOT_SPECIFIEDV;
RESULT := VSNINFO(VSN_NUM, VSN_ARY);
WRITE(OUT,<"RESULT = ",J4>,RESULT);
IF RESULT EQL CS_DATAOKV THEN
BEGIN
REPLACE LINEOUT BY " " FOR 80;
WRITE(OUT,80,LINEOUT);
WRITE(OUT,<"VSN ARRAY">);
WRITE(OUT,<"FIELD MEANING",T40,"LOCATION",T53,"VALUE">);
WRITE(OUT,<"-------------",T40,"--------",T53,"-----">);
WRITE(OUT, FORM1, "BASE CHARACTER SET NUMBER ",
"[0] ", VSN_ARY[0]);
WRITE(OUT, FORM1, "TEXT LINE ORIENTATION ",
"[1] ", VSN_ARY[1]);
WRITE(OUT, FORM1, "LINE ADVANCE DIRECTION ",
"[2] ", VSN_ARY[2]);
WRITE(OUT, FORM1, "CHARACTER ADVANCE DIRECTION ",
"[3] ", VSN_ARY[3]);
WRITE(OUT, FORM1, "NUMBER OF SPACES CHARACTERS ",
"[4].[47:8]", VSN_ARY[4].[47:8]);
FOR I := 1 STEP 1 UNTIL VSN_ARY[4].[47:8] DO
WRITE(OUT, FORM2, I,"[4].[",47-I*8,":8]",VSN_ARY[4].[47-I*8:8]);
WRITE(OUT, FORM1, "SIZE OF SPACES IN TRUTHSET ",
"[5].[47:8]", VSN_ARY[5].[47:8]);
WRITE(OUT, FORM1, "SIZE OF ALPHA TRUTHSET ",
"[5].[39:8]", VSN_ARY[5].[39:8]);
WRITE(OUT, FORM1, "SIZE OF NUMERIC TRUTHSET ",
"[5].[31:8]", VSN_ARY[5].[31:8]);
WRITE(OUT, FORM1, "SIZE OF PRESENTATION TRUTHSET ",
"[5].[23:8]", VSN_ARY[5].[23:8]);
WRITE(OUT, FORM1, "SIZE OF LOWER TRUTHSET ",
"[5].[15:8]", VSN_ARY[5].[15:8]);
WRITE(OUT, FORM1, "SIZE OF UPPER TRUTHSET ",
"[5].[7:8] ", VSN_ARY[5].[7:8]);
WRITE(OUT, FORM1, "UNUSED ",
"[6].[47:8]", VSN_ARY[6].[47:8]);
WRITE(OUT, FORM1, "SIZE OF ESCAPEMENT TRANS TABLE ",
"[6].[39:8]", VSN_ARY[6].[39:8]);
WRITE(OUT, FORM1, "SIZE OF LOWTOUP TRANS TABLE ",
"[6].[31:8]", VSN_ARY[6].[31:8]);
WRITE(OUT, FORM1, "SIZE OF UPTOLOW TRANS TABLE ",
"[6].[23:8]", VSN_ARY[6].[23:8]);
WRITE(OUT, FORM1, "SIZE OF NUMTOALTDIG TRANS TABLE",
"[6].[15:8]", VSN_ARY[6].[15:8]);
WRITE(OUT, FORM1, "SIZE OF ALTDIGTONUM TRANS TABLE",
"[6].[7:8] ", VSN_ARY[6].[7:8]);
WRITE(OUT, FORM1, "SIZE OF OSV TRANS TABLE ",
"[7].[47:8]", VSN_ARY[7].[47:8]);
WRITE(OUT, FORM1, "SIZE OF PSV TRANS TABLE ",
"[7].[39:8]", VSN_ARY[7].[39:8]);
WRITE(OUT, FORM1, "SIZE OF SUBSTCHAR TRANS TABLE ",
"[7].[31:8]", VSN_ARY[7].[31:8]);
WRITE(OUT, FORM1, "SIZE OF SUBSTSEQ TRANS TABLE ",
"[7].[23:8]", VSN_ARY[7].[23:8]);
WRITE(OUT, FORM1, "SIZE OF SUBSTOSV TRANS TABLE ",
"[7].[15:8]", VSN_ARY[7].[15:8]);
WRITE(OUT, FORM1, "SIZE OF SUBSTPSV TRANS TABLE ",
"[7].[7:8] ", VSN_ARY[7].[7:8]);
END;
CLOSE(OUT,LOCK);
END.Output
RESULT = 1
VSN ARRAY
FIELD MEANING LOCATION VALUE
------------- -------- -----
BASE CHARACTER SET NUMBER [0] 4
TEXT LINE ORIENTATION [1] 0
LINE ADVANCE DIRECTION [2] 0
CHARACTER ADVANCE DIRECTION [3] 0
NUMBER OF SPACES CHARACTERS [4].[47:8] 1
SPACE CHARACTER[1] (HEX) [4].[39:8] 40
SIZE OF SPACES IN TRUTHSET [5].[47:8] 8
SIZE OF ALPHA TRUTHSET [5].[39:8] 8
SIZE OF NUMERIC TRUTHSET [5].[31:8] 8
SIZE OF PRESENTATION TRUTHSET [5].[23:8] 8
SIZE OF LOWER TRUTHSET [5].[15:8] 8
SIZE OF UPPER TRUTHSET [5].[7:8] 8
UNUSED [6].[47:8] 0
SIZE OF ESCAPEMENT TRANS TABLE [6].[39:8] 64
SIZE OF LOWTOUP TRANS TABLE [6].[31:8] 64
SIZE OF UPTOLOW TRANS TABLE [6].[23:8] 64
SIZE OF NUMTOALTDIG TRANS TABLE [6].[15:8] 0
SIZE OF ALTDIGTONUM TRANS TABLE [6].[7:8] 0
SIZE OF OSV TRANS TABLE [7].[47:8] 64
SIZE OF PSV TRANS TABLE [7].[39:8] 64
SIZE OF SUBSTCHAR TRANS TABLE [7].[31:8] 0
SIZE OF SUBSTSEQ TRANS TABLE [7].[23:8] 0
SIZE OF SUBSTOSV TRANS TABLE [7].[15:8] 0
SIZE OF SUBSTPSV TRANS TABLE [7].[7:8] 0
In this call, the parameters have the following meanings:
VSN_NUM is an integer passed to the procedure. It contains the ccsversion number for which information is requested.
VSN_ARY is an array returned by the procedure. It contains the ccsversion information, as follows:
|
Location |
Information Contained |
|
WORD 0 |
Base coded character set number |
|
WORD 1 |
Text line orientation |
|
WORD 2 |
Line advance direction |
|
WORD 3 |
Character advance direction |
|
WORD 4 |
Space characters The first byte is the number of space characters; the actual characters follow |
|
WORD 5.[47:08] |
Size of SPACES truth set |
|
WORD 5.[39:08] |
Size of ALPHA truth set |
|
WORD 5.[31:08] |
Size of NUMERIC truth set |
|
WORD 5.[23:08] |
Size of PRESENTATION truth set |
|
WORD 5.[15:08] |
Size of LOWER truth set |
|
WORD 5.[07:08] |
Size of UPPER truth set |
|
WORD 6.[47:08] |
Unused |
|
WORD 6.[39:08] |
Size of ESCAPEMENT translation table |
|
WORD 6.[31:08] |
Size of LOWTOUP translation table |
|
WORD 6.[23:08] |
Size of UPTOLOW translation table |
|
WORD 6.[15:08] |
Size of NUMTOALTDIG translation table |
|
WORD 6.[07:08] |
Size of ALTDIGTONUM translation table |
|
WORD 7.[47:08] |
Size of OSV translation table |
|
WORD 7.[39:08] |
Size of PSV translation table |
|
WORD 7.[31:08] |
Size of SUBSTCHAR translation table |
|
WORD 7.[23:08] |
Size of SUBSTSEQ translation table |
|
WORD 7.[15:08] |
Size of SUBSTOSV translation table |
|
WORD 7.[07:08] |
Size of SUBSTPSV translation table |
It is recommended that the size of VSN_ARY be 8 words.
RESULT is an integer returned by the procedure. It indicates whether or not an error occurred during the execution of the procedure. An explanation of the error result values and messages can be found at the end of this section. The values returned by this procedure include:
|
CS_ARRAY_TOO_SMALLV (3001) |
CS_FILE_ACCESS_ERRORV (1000) |
|
CS_BAD_ARRAY_DESCRIPTIONV (3000) |
CS_NO_NUM_FOUNDV (3003) |
|
CS_DATAOKV (1) |
|
|
CS_FAULTV (1001) |
CS_SOFTERRV (1002) |

