PreviousNextIndex

ENTRY statement

Used on the left-hand side of an assignment to set the nth element to some value.

Syntax

ENTRY ( element , list [ , character ] ) = expression 

element
list
character
expression
Example

This procedure uses three ENTRY statements:

r-ent-eq.p
DEFINE VARIABLE num-recs AS INTEGER   NO-UNDO. 
DEFINE VARIABLE msg-txt  AS CHARACTER NO-UNDO INITIAL 
  "There are <x> records in the table.". 
/* Count the records. */ 
FOR EACH Customer NO-LOCK: 
  num-recs = num-recs + 1. 
END. 
/* If there is only one record, make the message singular. */ 
IF num-recs = 1 THEN 
  ASSIGN 
    ENTRY(2,msg-txt," ") = "is" 
    ENTRY(4,msg-txt," ") = "record". 
/* Insert the record count into the string. */ 
ENTRY(3,msg-txt," ") = STRING(num-recs). 
MESSAGE msg-txt. 

Note

The ENTRY statement is double-byte enabled. It can insert an entry that contains double-byte characters into a specified list and the character delimiter can be a double-byte character.

See also

ENTRY function


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex