Example 1
This example uses GATHER to copy data to a new record in a table. After the table Test
is created, SCATTER is used to create a set of variables based on the fields in the table. Each field is then assigned a value and a new blank record is added to the table.
CREATE TABLE Test FREE ;
(Object C(10), Color C(16), SqFt n(6,2))
SCATTER MEMVAR BLANK
m.Object="Box"
m.Color="Red"
m.SqFt=12.5
APPEND BLANK
GATHER MEMVAR
BROWSE
Example 2
This example uses GATHER along with the NAME clause to copy data to a new record in a table. After the table Test
is created, SCATTER is used to create an object with properties based on the fields in the table. The object's properties are then assigned values and a new blank record is added to the table.
CREATE TABLE Test FREE ;
(Object C(10), Color C(16), SqFt n(6,2))
SCATTER NAME oTest BLANK
oTest.Object="Box"
oTest.Color="Red"
oTest.SqFt=12.5
APPEND BLANK
GATHER NAME oTest
RELEASE oTest
BROWSE