[Next] [Up] [Previous]

Basic Information

Character Set

It is possible to enter any EXALT program using only the following characters:


and the space. The availability of additional printable characters can enhance the readability of EXALT programs.

Note that this set of 60 characters consists of those found on most EBCDIC keypunches as well as uppercase-only ASCII devices. Thus, EXALT programs can be entered on most existing computer systems. However, due to a standardization effort which favored PL/I over the English language, on some systems EBCDIC ! is considered equivalent to ASCII | rather than !, which may pose some problems. Also, several of the ASCII characters which correspond to national-use positions of the ISO 7-bit code, or the International Telegraph Alphabet no. 5 (CCITT v.3) are used above.

The international currency symbol can be used as a substitute for $; @ may have the substitute ?&, and # has &E as its substitute, where national-use characters are to be avoided. Even when the full basic character set is available, other characters not in that set are useful in programs, and we will next examine how they are represented.

The following table shows character substitutions made when only the basic character set is available:

Sub Equiv Sub Equiv
?< { &LE less-than-or-equal-to sign (NOT <=)
?> } &GE greater-than-or-equal-to sign (NOT >=)
?( [ &NE not-equal-to sign, (NOT <>, #=, etc.)
?) ] &NOT ~
?= left-arrow &AND Boolean AND symbol
&OR Boolean OR symbol
?1; | &PW up-arrow
&LOG £
?. diamond &DEG °
@# pincushion (lozenge)
?1: \ &I ! (for prefix use only)
@< « &J ¡ (for prefix use only)
@> » &K ¿ (for prefix use only)
&RT radical sign
?& @ &ANG angle symbol
&E #
?- ~

The first column shows special-function characters, and the second column shows mathematical operators, the meaning of which will be defined later.

There are four 'escape' characters in EXALT, which are used to build entities that act like single special characters, thus allowing the use of an extended character set within EXALT.

The question mark (?) follows the rule that a token it creates consists of the question mark that begins it, possibly some of the characters that can be used in identifiers (letters, digits, underscores, and dollar signs), and then one special character which ends the token. If the ending special character is a colon, semicolon, or comma, these being 'separators' in EXALT, the result is a separator; if it is a parenthesis, or one of the operators < and >, the result is a kind of bracket.

Quotation marks are not allowed as the closing character of a token built with the question mark, as % is used to create constants.

The ampersand follows a different rule:

Letters following the ampersand may be terminated by a space as well as by a special character or digit, and if a special character or digit follows, it is not a part of the token;

If followed by a special character, the token consists of that character followed by any number of identifier characters up to and including another special character, except that if the special character is a quotation mark, the token continues until that same quotation mark is found;

and the presence of parentheses and separators as part of an &-token does not indicate anything about the nature of the token.

Digits immediately following the ampersand are also possible; when a special character is reached, then the rule for terminating the token is the same as for a special character immediately following the ampersand.

The %-sign is used to create constants. % may be followed by another % immediately, affecting the meaning of the token created, but not the syntax rule for what follows. % may precede a numeric constant, which then ends normally. If it is followed by letters, they determine what is expected following the % sign, with decoding taking place one letter at a time. Usually, a numeric or string constant, or a parenthesized entity will end the token; but digits can be part of the token descriptor as well, and multiple parenthesized entities can be required, depending on the specific use of %.

The @-sign creates entities such as the continuation line indicator, the character allowing multiple statements per line, and comments. It may be followed by either a single special character, or by any number of identifier characters and spaces which continue up to, but not including, the next special character in the resultant symbol.

Variable Names

Variables, subroutines, functions, and other such entities, can be given names (identifiers) which follow these rules:

Statement keywords are not reserved words, since every statement must start with one, even the assignment statement (the keyword LET has a period (.) as its abbreviation). Therefore, there is no possibility of conflict between a statement keyword and an identifier.

Words within statements can be the names of types; in this case, EXALT indicates the position of a type name unambiguously in the syntax, usually by placing it within parentheses.

Other keywords, like TO or BY or STEP or THEN, found in many languages, are not part of EXALT: instead, punctuation marks (chiefly the separators colon, comma, and semicolon) are used for these functions, although syntactically distinct keyword-like objects (i.e. &'THEN') are also allowed as an alternative in YAL where this may contribute to program readability.

Normally, lower-case letters in the Latin alphabet are interpreted as being equivalent to upper-case letters in that alphabet.

In addition to making use of special characters if they are available, EXALT is defined in such a way as to permit the use of other alphabets, such as the Greek alphabet, if available on a computer system. A requirement for this is that the letters of such an alphabet have distinct internal representations on the computer system in use, so that the compiler can recognize them: shift codes peculiar to one output device are not normally part of an operating system.

If this condition is satisfied, a potential problem still occurs. The lower-case version of Greek alpha does not resemble "a", but "A" is both capital A and capital alpha. Thus, case-independence within EXALT can lead to confusion in a multi-language situation. The directive @$: is used to identify the language considered to be the principal language of a program; warning messages will then be generated concerning visually ambiguous identifiers.

As the letters of foreign alphabets are treated as alphabetic characters, not special characters, the reserved identifier _PI is NOT an alias for the Greek letter pi; instead, if the Greek alphabet is available, the circle ratio also has the representation of an underscore followed by that letter.

Special style versions of letters are not given case-independence, as it is considered safe to assume the availability of lower case on input devices with such extended capabilities.

Instead, bold, italic, script, or Fraktur upper-case letters are used to name functions distinctively following the practice in normal mathematical notation, and in lowercase, the styles have the following significance:

bold &'bold' a keyword
semibold _semibold a predefined function or other identifier
italics &italics a predefined operator
bolditalic &.bolditalic. a user operator
script &"script" a user type

On the other hand, case-independence also includes small capitals with normal weight.


A program in EXALT consists of statements. These statements may be labeled with statement numbers, consisting of one to six digits.

The statement proper normally begins with a statement keyword or an abbreviation of that keyword. These entities consist of either one special character (a character other than a digit or a letter) or two or more letters, terminated by a space or a special character which is not part of the keyword.

The keyword for an assignment statement is LET, which is abbreviated as the period (.). This ensures straightforward statement decoding, by allowing the NO RESERVED WORD principle of EXALT to be observed.

The keywords for type declaration statements may have single-letter abbreviations, because type names are used within EXALT statements as well, but executable statements have only abbreviations and keywords which consist of either two or more characters, or a special character instead of a letter. Thus, except for the first executable statement in a program, assignments to variables with single-character names do not require the presence of the keyword for the assignment statement.

Where a statement is not labeled with a statement number, at least one space must precede the statement keyword where that statement starts at the beginning of a record. Any record in the source stream of a EXALT program which begins with a letter or an asterisk (*) is considered to be a comment record, and is ignored during compilation. (Note that letters of additional alphabets, such as the Greek alphabet, if available, may be used in variable names, and indicate comments as well.)

Spaces are significant within character strings in EXALT, as in other languages. In addition to being required to keep the first letter of a keyword from being the first character of a record, they are also significant in EXALT under the following circumstances:

The symbol @ appears as the first character of entities which are not part of the program text proper; for example, continuation line indicators and comment indicators.

Since the continuation of a statement over multiple lines is indicated by symbols beginning with @, the symbol which allows multiple statements per line is also in this class. Although the break between statements is part of a program, it is not part of any statement.

@; and
@: and
@/ act as a pseudo-end-of-record separating multiple statements on the same line
@. and
@- indicate that the statement on this line is to be continued to the next line, ignoring end-of-record (also, everything after @- on the record is a comment, allowing @... for example)
@@ indicates the point on the next record from which such continuation starts

this, like @-, continues a statement, but also cancels the closing single quote (') which must immediately precede it: the purpose of this token is to allow a single quoted string to cross record boundaries: for example,

   PRINT 'This is an example '@'
 @@of a very long string'

is exactly equivalent to

   PRINT 'This is an example of a very long string'
@" the equivalent of @', but for double quotes (").
@= indicates that record boundaries are to be ignored for the current statement (but not for any statements contained within it by means of statement parentheses) and an explicit @/ is required to end this statement. The primary use of this symbol is to improve the form of IF statements under certain circumstances.
@< opens a comment which is allowed to cross line boundaries, and which is allowed to be in the middle of a statement.
@> closes such a comment. These entities function in the same way as { and }, or (* and *), in Pascal and Algol, or /* and */ in PL/I and C.
@# indicates that the remainder of the current record is a comment. This functions in the same way as " in RATFOR, or // in C++ (and newer versions of C). (no, @/ cannot terminate such a comment, nor can a comma at the end of such a comment continue it onto the next record.)

indicates a special message to the compiler that is not part of the program (from the viewpoint of which @$ acts like @#) such as:

@$L+ resume listing the program if listing was permitted when the compiler was invoked
@$L- suppress listing until @$L+ is encountered
@$I 'filename' get program text from the file filename until it ends, then resume using the text in this file (note that this message alters the program text, even though the message is not itself part of that text!)
@$@+ turn on checking of @-messages
@$@- turn off checking of @-messages if that is permitted
@$AL+ list, in assembly code format, the object code generated by the compiler (if the implementation provides this option)
@$AL- turn off the listing of object code in assembly code format
@$IF condition ignore the code following unless the condition is true, until an @$ELSE or an @$ORIF or an @$ENDIF; possible conditions are outlined in the description of the COLLECTION and GENERIC statements
@$ORIF condition similar to @$IF, but also ends an IF clause, and creates no new nesting
@$ELSE assuming this follows an @$IF, which it should, ignore the following code if any code following an @$IF or @$ORIF within the same sequence has been used
@$ENDIF end an @$IF sequence, and return to accepting code unconditionally
@$CP+ code, explicitly indicated to execute in parallel, is to be caused to at least execute concurrently where parallelism is not available
@$CP- parallel code may be executed sequentially (as, presumably, algorithms depending on concurrency are not in use, and parallelism was explicitly indicated only to allow a program whose parts could proceed independently to execute faster)

Note that these directives, because they begin with @$, and not @# or @<, are syntactically distinct from true comments in EXALT, and thus make it unnecessary for implementors to attribute significance to text found within comments.

It should, however, be noted that some operating systems may place restrictions on the placement of special characters in column 1 of a record, allowing, for example, $END or /* to indicate an end-of-file mark by means of printable characters. This may restrict the contents of multi-line comments (that is, comments delimited by @< and @>), placing @@ at the very beginning of a record, or beginning a comment record with *.

@ followed by a space or a letter indicates a 'comment' that may include only letters, spaces, underscores, and digits, which continues up to, but not including, the first special character following it (and is also terminated by end-of-record).

Although the entity thus created does not change the result of a program, the compiler may read such entities and generate error messages based on their contents. The purpose of this form of comment is to permit a statement like

  IF X=Y, {. M=2}, {. M=5}

to be entered as

   IF X=Y @THEN,
    LET M @EQUAL= 2
   @END}      @-
 @@ @ELSE,
    LET M @EQUAL= 5

or, if preferred,

  IF X=Y,
  { LET M @EQUAL= 2
  { LET M @EQUAL= 5

and error checking of these 'comments' is available to prevent statements like


which are misleading (the statement still sets M=2 if X=Y, and M=5 otherwise, not the other way around, as the @-comments imply).

Note the need for a continuation line indicator in the truthful example to allow the first END and its following ELSE to be on separate lines, since, as in an IF statement without @-comments, } not followed by a comma indicates the intent to omit the alt-false argument of the IF statement: only when a separator is the last character in a statement appearing on a record is automatic continuation to the next line assumed.

It is also possible to replace { with &'begin' instead of appending @begin to {, and so on.

It should be noted that the @ symbol has no special significance within character strings. (This, of course, is why the directive @' has to follow a closing ' for it to produce its effect, and why character string constants cannot be otherwise continued.) Anywhere else in a program, (within an expression, within an argument list) however, @-class symbols may have their special effect.

This manual deals primarily with the FULL mode of the EXALT compiler. This mode generates code basically compatible with FORTRAN, except for the default order in which arrays are stored, possibly a difference in the form of CHARACTER variables, and the requirement for slight extensions to the calling sequence for subprograms to handle QUATERNION and CHARACTER -valued functions and the omission of arguments in the middle of an argument list.

A EXALT compiler may also provide, as an option, the EASY mode. In this mode, all arguments are passed as MUTABLE, and a calling sequence is used which removes the need to declare subroutines with unusual headers in their callers. As well, all variable names are retained, to allow the _EXEV function and related functions to act upon items fully equivalent in meaning to that they would have as part of the program.

This mode will require considerably more overhead on conventional architectures. On some language-oriented and protected architectures, some aspects of FULL mode may not be present in a practical implementation.

[Next] [Up] [Previous]