User Tools

Site Tools


over_set_shared_memory_location_.htm
Navigation:  Language Reference > 5 - Declaration Attributes > Variable and Entity Attributes >====== OVER (set shared memory location) ====== Previous pageReturn to chapter overviewNext page

NewC7.jpg

OVER(overvariable)

blk2blue.jpg

OVER Allows one memory address to be referenced two different ways.
overvariable The label of a variable that already occupies the memory to be shared.

The OVER attribute allows one memory address to be referenced two different ways. The variable declared with the OVER attribute must not be larger than the overvariable it is being declared OVER (it may be smaller, though).

You may declare a variable OVER an overvariable which is part of the parameter list passed into a PROCEDURE.

A field within a GROUP structure cannot be declared OVER a variable outside that GROUP structure.

Example:

SomeProc PROCEDURE(PassedGroup)     !Proc receives a GROUP parameter

NewGroup GROUP,OVER(PassedGroup)    !Redeclare passed GROUP parameter

Field1    STRING(10)                !Compiler warning issued that

Field2    STRING(2)                 !NewGroup must not be larger

        END                        !than PassedGroup

CustNote  FILE,PRE(Csn)             !Declare CustNote file

Notes     MEMO(2000)                !The memo field

Record     RECORD

CustID      LONG

          END

         END

CsnMemoRow STRING(10),DIM(200),OVER(Csn:Notes)

                                   !Csn:Notes memo may be addressed

                                   ! as a whole or in 10-byte chunks

See Also:

DIM

over_set_shared_memory_location_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1