|Navigation: Language Reference > 5 - Declaration Attributes > Variable and Entity Attributes >====== OVER (set shared memory location) ======|
|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.
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
!Csn:Notes memo may be addressed
! as a whole or in 10-byte chunks