Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ assignment(1) — ACMSxp 3.2A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

conditional_statements(1)

exception(1)

statement(1)

stdl_syntax(1)

task_definition(1)

workspace(1)

acmsxp_introduction(1)

assignment(1)  —  Commands

Digital

NAME

ASSIGNMENT − A statement that manipulates workspace contents by assigning a value to one or more workspace fields

SYNOPSIS

The assignment statement syntax is:                                               { <class-id>            }
                                              { <decimal-literal>     }
                                              { <integer-expression>  }
 [<label-name>:] <destination-field> [,...] = { <message-group-id>    } ;
                                              { <message-id>          }
                                              { <string-literal>      }
                                              { <uuid-string-literal> }
                                              { <workspace-field>     }

PARAMETERS

       •label-name
 
An internal unqualified identifier associated with the statement, for use in flow control operations.

       •destination-field
 
The name of a workspace field or list of workspace fields to which you want to assign a value. The destinations must have data types that match or are compatible with those of the source.

       •=
 
The assignment operator from the STDL alphanumeric character set. The evaluated source value to the right of the operator is assigned to the destination field or fields to the left of the operator.

       •class-id
 
Name of one of the standard, predefined exception classes.

       •decimal-literal
 
Sequence of numeric characters from the STDL alphanumeric character set.

       •integer-expression
 
An integer literal, the contents of an integer workspace field, or the value of another integer expression to be assigned to the destination field. If you specify an integer expression, the result of the integer expression is stored as the new value of the destination field or list of fields.
 
The format for an integer expression is:
 
{  { + } { <operand>                }                                } |  |   | |                          |                                | |  { - } { (<integer-expression>)   }                                | {                                                                    } |                               { + }                                | | { <operand>                 } | - |  { <operand>               }   | | |                           | | ∗ |  |                         |   | | { (<integer-expression>)    } { / }  { (<integer-expression>   }   | {                                                                    }
 
Specify an operand using either an integer literal or an integer workspace field.
 
Use parentheses in integer expressions to specify the order in which elements are evaluated. Expressions within parentheses are evaluated first. Within nested parentheses, evaluation proceeds from the least inclusive set to the most inclusive set.
 
When parentheses are not used, or expressions in parentheses are at the same level of inclusiveness, the following hierarchical order of evaluation pertains:

oUnary plus (+) or minus (-)
 
A unary plus is a plus at the beginning of the operand or integer expression. A unary plus has the effect of multiplying the operand or integer expression by +1. A unary minus is a minus at the beginning of the operand or integer expression. A unary minus has the effect of multiplying the operand or integer expression by -1.

oMultiplication and division

oAddition and subtraction

If you do not use parentheses to specify the sequence of execution, the order of execution of consecutive operations of the same hierarchical level is from left to right. 
 
The integer operators are used to indicate addition, subtraction, multiplication, and division.

       •message-group-id
 
An unqualified external identifier that identifies a message group

       •message-id
 
An unqualifier external identifier that identifies a message within a message group definition associated with this task definition. When a message group name or message group UUID is available, a message identifier can be used as a qualified external identifier.

       •string-literal
 
A sequence of characters selected from one execution character set.

       •uuid-string-literal
 
A restricted string literal giving a universal unique identification (UUID).

       •workspace-field
 
Identifier for a field within a workspace or for the entire workspace. The type can be array, decimal, integer, octet, record, text, or UUID.
 
If the assignment statement refers to any transactional workspace fields, the assignment must be enclosed by a transaction block.
 

DESCRIPTION

A source value can be evaluated and the results assigned to one or more destination workspace fields. This can involve computing an integer expression and assigning the result to a field. 
 
When an assignment statement is used in a noncomposable task outside a transaction block, it must not refer to any transactional workspace fields.
 
To be manipulated, source and destination fields of the assignment statement must have matching or compatible data types.
 

Destination FieldSource Value
 

Array workspace fieldArray workspace field
 

Decimal workspace fieldDecimal literal, decimal workspace field
 

Octet workspace fieldOctet workspace field
 

Integer workspace fieldClass identifier, integer expression, integer literal, integer workspace field, message identifier
 

UUID-workspace fieldMessage group identifier, UUID-string literal, UUID-workspace field
 

Record workspace fieldRecord workspace field
 

Text workspace fieldString literal, text workspace field

The data types of the elements in each array must match. The source and destination arrays must be the same size. For variable length arrays, the minimum sizes and the maximum sizes of the source and destination arrays must be the same. 
 
All fields in each record must match in order, data type, and size.
 
A workspace field specified as the source value must have the same data type as the workspace field specified as the destination field. A text workspace field specified as the source value must use the same character set as the destination field.
 
When the destination field is larger than the source, for a decimal workspace field, ACMSxp software pads the destination field to the left with zeros. For a text workspace field, ACMSxp software pads the destination field to the right with spaces. Similarly, if the destination field is smaller than the source field, the source is truncated from the left to fit the destination field.
 
The normal execution for an assignment statement is:

oEvaluate the source value. 
 

oMove the value of the source field to one or more of the destination fields. 
 

oComplete with default flow control. 
 

oThe result of the evaluation is stored as the new value in the workspace field or fields specified in the destination. 

Deviations from the normal flow occur when one of the conditions listed in the Exceptions section occurs during the assignment statement. The statement completes with the exception associated with that condition and the value of the destination field is undefined. 
 

EXCEPTIONS

The assignment statement can generate the AP-EXECUTION-FAULT exception class.  The AP-EXECUTION-FAULT exception class indicates one of the following error conditions:
 

oDuring the evaluation of an integer expression:
 
-  An integer value exceeded the data type INTEGER range.
 
-  An attempt was made to divide by zero.
 

oThe subscript used to refer to an element in a fixed- length array is invalid (referring to A(n) where n is less than one or n is greater than the maximum size of array). 
 

oThe subscript used to refer to an element in a variable-length array is invalid (referring to A(n) where n is less than one or n is greater than the value of the DEPENDING ON field). 
 

oThe value of the DEPENDING ON field used when referring to an element of a variable-length array is invalid (the value of the DEPENDING ON field is less than the minimum size of the array or the value of the DEPENDING ON field is greater than the maximum size of array). 
 

oThe value of the DEPENDING ON field was invalid when referring to a workspace name or workspace field containing a variable-length array. 
 

RELATED INFORMATION

Syntax: conditional_statements(1), exception(1), statement(1), stdl_syntax(1), task_definition(1), workspace(1)

acmsxp_introduction(1)
 
 
 
 
 
 
 
 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026