Difference between revisions of "SCATTER"

From Lianjapedia
Jump to: navigation, search
Line 3: Line 3:
  
 
==Syntax==
 
==Syntax==
SCATTER [FIELDS <field list>] [MEMO] TO <array> [BLANK] | MEMVAR [BLANK]
+
SCATTER [FIELDS <field list> | FIELDS LIKE <skeleton> | FIELDS EXCEPT <skeleton>]
 +
 
 +
[MEMO]
 +
 
 +
TO <array> [BLANK] | MEMVAR [BLANK]
  
 
==See Also==
 
==See Also==
Line 11: Line 15:
 
The SCATTER command copies the contents of fields from the current table record into an array or series of memory variables.
 
The SCATTER command copies the contents of fields from the current table record into an array or series of memory variables.
  
====FIELDS <fields>====
+
====FIELDS <field list> | FIELDS LIKE <skeleton> | FIELDS EXCEPT <skeleton>====
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.
+
The optional FIELDS clause is used to copy only the contents of fields specified in the <field list> or those matching the LIKE <skeleton> or those not matching the EXCEPT <skeleton>.  If the FIELDS clause is not specified, the SCATTER command copies the contents of all fields.
  
 
====MEMO====
 
====MEMO====

Revision as of 11:34, 22 May 2014

Purpose

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

Syntax

SCATTER [FIELDS <field list> | FIELDS LIKE <skeleton> | FIELDS EXCEPT <skeleton>]

[MEMO]

TO <array> [BLANK] | MEMVAR [BLANK]

See Also

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 <field list> | FIELDS LIKE <skeleton> | FIELDS EXCEPT <skeleton>

The optional FIELDS clause is used to copy only the contents of fields specified in the <field list> or those matching the LIKE <skeleton> or those not matching the EXCEPT <skeleton>. 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