Next: Statement, Previous: Sizety, Up: Language   [Contents][Index]


Skip ¶

Meaning ¶

skip is a unit, and as such yields a value of a particular mode. It can only be used in a strong syntactic position, where the compiler can determine the desired mode.

The particular value yielded by skip is non-important, and is in fact undefined in the Revised language. However, some implementations always use the same values according to the desired mode. For example, in GCC the skip of an int is always 0, and the skip of a string is always the empty string "". Programs intended to be portable among different Algol 68 implementations should not make advantage of this.

The reference language includes a shorter representation for skip: the tilde character ~.

A typical use of skip is in the do-part of loop clauses, like in:

for i to UPB elems'set
while (name'elems[i] = name | e := elems[i]);
      e :/=: nil
do ~ od

skip is also useful when doing top-down programming, for example when deferring the implementation of a procedure like in:

proc whatever = (int arg) int:
   skip; { WRITEME }

Another typical use is in contexts in which an unit is required after a set of declarations. This is the case with serial clauses and module definitions:

module Constants =
def
    pub real pi = 3.14159;
    pub real e  = 2.71828;
    skip
fed

Syntax ¶

[RR 5.5.2.1]

a) strong MOID NEST skip{5A} : skip{94f} token.

See Also ¶

  • [RR 5.5.2.1.a]

Next: Statement, Previous: Sizety, Up: Language   [Contents][Index]