Contents | Prev | Next | Index


With Statements

The purpose of a with statement is to specifiy a record or class designator for a statement. It is usually applied for a compound statement. In this statement the qualification of field or method identifiers may be omitted if they are to refer to the variable specified in the with clause. The with statement opens a new scope.

with_stmt       ::= WITH rec_designators DO stmt
rec_designators ::= rec_designators , rec_designator
                ::= rec_designator
rec_designator  ::= expr

The with statement

WITH e1, e2, ..., en DO
  stmt;

is a short notation for the nested with statements

WITH e1 DO
  WITH e2 DO
    :
    WITH en DO
      stmt;


Contents | Prev | Next | Index

Canterbury Pascal for JVM  (Last documentation update Sep 02, 2004)
Copyright © 1999-2004 J.Neuhoff - mhccorp.com  . All rights reserved.
Please send any comments or corrections to neuhoff@mhccorp.com