SCATTER

From Recital Documentation Wiki
Jump to: navigation, search

Purpose

Copy the contents of fields to an array or to a series of memory variables


Syntax

SCATTER [FIELDS <field list>] [MEMO] TO <array> [BLANK] | MEMVAR [BLANK]


See Also

ACHOICE(), ADEL(), ADIR(), AFIELDS(), AFILL(), AINS(), ALEN(), APPEND FROM ARRAY, ARRAY(), ASCAN(), ASORT(), COPY TO ARRAY, GATHER, IN_ARRAY(), IS_ARRAY(), LOCAL, PRIVATE, PUBLIC


Description

The SCATTER command copies the contents of fields from the current table record into an array or series of memory variables.

FIELDS <fields>

The optional FIELDS clause is used to copy only the contents of fields specified in the <field list>. If the FIELDS clause is not specified, the SCATTER command copies the contents of all fields.

MEMO

By default, memo fields are ignored by the SCATTER command. If the MEMO keyword is specified, memo fields will be included.

To <array> [BLANK]

The fields are copied into consecutive elements of the specified array. If the array does not exist, then it is created. If the BLANK keyword is specified, the elements are created but are empty and are the same size and data types as the specified fields.

MEMVAR [BLANK]

The fields are copied into a series of memory variables with the same name as the field names. If the memory variables do not exist, then they are created. If the BLANK keyword is specified, the memory variables are created but are empty and are the same size and data types as the specified fields.

NOTE: 'TO' should not be included in the MEMVAR clause.


Example

use addresses index add_1
seek "Seymour House"
if found()
    scatter to aTemp
endif


Products

Recital Server, Recital