The default character type is the character type assumed by pointers, string variables, string literals, and so on when a character type is not explicitly specified. The default character type is also used as the default value of the INTMODE file attribute. For more information on INTMODE, refer to the File Attributes Programming Reference Manual.
The ASCII compiler control option affects the default character type. For more information, refer to “ASCII Option” in Compiling Programs. If the ASCII option is TRUE, the default character type is ASCII. If the ASCII option is not TRUE, the default character type is EBCDIC.
Free-field and formatted I/O generate EBCDIC data. If the default character type is EBCDIC or ASCII, EBCDIC data is generated.
The following example program demonstrates the effect of a default character type:
BEGIN % OPTION RECORD FILE F(KIND=DISK,NEWFILE=TRUE); ARRAY A[0:9]; POINTER P; STRING S; % DECLARATION OF S OPEN(F); P := POINTER(A); S := "ABC"; % STRING ASSIGNMENT END.
Example
If this example is compiled and executed as is, the default character type is EBCDIC. Thus, the INTMODE attribute of file F is EBCDIC, the character size of pointer P is eight bits, the string type of string S is EBCDIC, and, after the string assignment is executed, S contains the EBCDIC string ABC.
If % OPTION RECORD on the third line is replaced by the compiler control record $ SET ASCII, and the program is compiled and executed, the default character type is ASCII. Thus, the INTMODE of file F is ASCII, the character size of pointer P is eight bits, the string type of string S is ASCII, and, after the string assignment is executed, S contains the ASCII string ABC.

