ADXIFS

Contents


adxifs contains the field separator used for the read or write of a sequential file.

 

Class, Type, and Dimension

[S]adxifs(1) Char

 

Examples

   # Read of the users of the Adonix group from the file
 # UNIX /etc/passwd
 # for which the structure is LOGIN:PWD:UID:GID:NOM:HOM:SHELL
    Local Char LOGIN(15),PWD(15),UID(5),GID(5),NOM(80),HOM(80),SHELL(80)
   Openi "/etc/passwd"
   adxifs = ":"
   adxirs = chr$(10)
   Repeat
       Rdseq LOGIN,PWD,UID,GID,NOM,HOM,SHELL
           If GID = num$([L]GROUP_ADONIX)
       ## after the process
       Until fstat
   Openi
   # Write of a file where the fields are separated by a comma (,)
    adxifs = ','
  adxirs = chr$(10)
    # Opening for addition
    Openo "FILE", -1
  Wrseq CHAMP1, CHAMP2, CHAMP3, CHAMP4

 

Description and Comments

adxifs is used in conjunction with the Rdseq and Wrseq instructions. These instructions read and write data in ASCII format, structured in fields and records:

- Rdseq reads a record, each variable given in parameters of the instruction that corresponds to a field (or a group of fields in the case of an element table) separated from whatever follows by the character defined in adxifs.

- Wrseq writes a record, each variable given in parameters of the instruction that corresponds to a field (or a group of fields in the case of an element table) separated from whatever follows by the character defined in adxifs.

adxifs acknowledges chr$(32) (the space) as a default value.

If the field separator is the space, then Rdseq considers several spaces in a row as a single separator.

 

Associated Errors

No associated error

 

Associated Keywords

ADXIRS  - RDSEQ - WRSEQ - OPENI - OPENO


CONTENTS


Copyright © Sage 1999 - 2007