PreviousNextIndex

Assignment (=) statement

Assigns the value of an expression to a database field or variable.

Data movement

Syntax

field = expression [ NO-ERROR ] 

field
expression
NO-ERROR
Example

This procedure resets all the monthly quota values to 2500 in all salesrep records. If you want to set values for individual array elements, you can do so by making an explicit assignment using the assignment statement and a specific array reference, such as month-quota[1] or month-quota[i].

r-asgmnt.p
DEFINE VARIABLE ctr AS INTEGER NO-UNDO. 
FOR EACH SalesRep: 
  DO ctr = 1 TO 12: 
    SalesRep.MonthQuota[ctr] = 2500. 
  END. 
END. 

Notes
See also

ASSIGN statement, CAST function, Class-based object reference, COPY-DATASET( ) method, COPY-LOB statement, COPY-TEMP-TABLE( ) method, Data types, Expression, FIX-CODEPAGE statement, NEW statement


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex