Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

GKS - Principles

1995 Version of ANSI (Equivalent to Current ISO Version) of Standard

3 Principles
3.1 MUMPS syntax
3.1.1 Metalanguage forms

As defined by X11/92–46 "Device Handling" (MDC Type-A document):

    format::=






!
#


... [ ? intexpr ]

? intexpr
/ controlmnemonic [ ( L expr ) ]





    controlmnemonic::=

?
alpha




alpha
digit


...

The GKS-applicable form of the useargument syntax is:

    useargument::= expr : [ deviceparameters ] : mnemonicspace
    mnemonicspace::= expr V mnemonicspacename
    mnemonicspacename::= │ GKS │

(Note that this is the syntax that applies to GKS – other forms of the useargument are used for other device types)

The following metalanguage elements will be used to describe the GKS parameters:

    gksnam::= expr V strlit
    gksfile::= expr V strlit
    gksstr::= expr V strlit
    gksnum::= numexpr
    gksint::= intexpr
    gksenum::= expr V strlit
    gksdat::= expr V strlit
    gkspnt::= L gksint
    gksplst::= L gkspnt

Certain GKS controlmnemonics return a value or collection of values. It is permitted to issue these controlmnemonics with either the WRITE or the READ statement. If a READ statement is used, the argument list in that statement and/or subsequent statements must be ordered to correctly accept the returned values. If a WRITE statement is used, the values returned may be read from the buffer by a single, or series of, READ statements. These READs must be correctly ordered to match the returned values. However, there may be intermediate calculations utilizing some of the returned values before reading the remaining values in the list.

Reading the return list of values may be terminated without error by issuing another GKS controlmnemonic. In this case, all return values not yet assigned to a variable will be lost to the application program.

Certain GKS controlmnemonics result in a collection of values being returned – the number of values actually returned is specified by some of the initial values returned. The following metalanguage syntax will represent this construct:

    v1::= gksint       number of segment names (n)
    v2::= M gksnam       n values; each a segment name

v1 in this definition would represent the number of values to be specified by v2, and would be performed by the following example:

Read V1 For II=1:1:V1 Read V2(II)

Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

Copyright © Standard Documents; 1977-2024 MUMPS Development Committee;
Copyright © Examples: 1995-2024 Ed de Moel;
Copyright © Annotations: 2003-2008 Jacquard Systems Research
Copyright © Annotations: 2008-2024 Ed de Moel.

This page most recently updated on 13-Sep-2014, 14:32:24.

For comments, contact Ed de Moel (demoel@jacquardsystems.com)