Copyright Digital Equipment Corp. All rights reserved.

WITH

 The  WITH  statement  provides  an  abbreviated   notation   for
 references  to  the fields of a record variable or to the formal
 discriminants of a discriminated schema type.


 Syntax:

    WITH {record-variable | schema-variable},... DO
       statement


 The 'record-variable' is the name of the record  variable  being
 referenced.

 The 'schema-variable' is the name of the schema  variable  being
 referenced  whose  type  is  a  discriminated schema type.  This
 underlying type of the schema can be a record.

 The 'statement' is any VSI Pascal statement.

 The WITH statement allows you to refer to the fields of a record
 or  to  an formal discriminant of a schema by their names alone,
 rather    than     by     the     record.field-identifier     or
 schema-variable.formal-discriminant syntax.  In effect, the WITH
 statement  opens  the  scope  so  that   references   to   field
 identifiers  or  to  formal discriminants alone are unambiguous.
 When you access a variable using a WITH statement, the reference
 syntax lasts only throughout the execution of the statement.

 If you are specifying nested records, their variable names  must
 appear in the order in which they were nested in the record type
 definition.  If you are working with record and schema variables
 that  are  not  nested,  you  can  specify variable names in any
 order.  If you specify record or schema  variables  whose  field
 names  or  formal  discriminants  conflict with one another, VSI
 Pascal uses the last record or schema in the comma list.


Additional information available:

Examples