User Tools

Site Tools


jvs:cigal:manual:chapter2:write

CIGAL Reference Manual, Chapter 2 (Commands): WRITE

WRITE -- Write data from a CIGAL data variable to a disk file

usage: write filename [ varb flag recsize hdrbytes wordsize ]

Use WRITE to write a CIGAL variable's binary data to a disk file. This command writes data a block at a time with no format conversion. The FILE argument specifies which disk file is to be written, and the VARB argument indicates where to read the data are. The WRITE command transfers as many records as needed to write all of VARB.

The arguments to WRITE are:

FILE

The file argument is required. FILE can either be a character string giving the name of the disk file explicitly, or it can be a number, in which case the file name is generated by appending that number to the character string in the DATADIR internal variable (see DATADIR(4)). An error message will appear if WRITE cannot create a disk file with the specified name. See FILES(1) for more general information on accessing disk files from CIGAL.

VARB

The source variable can be any ARRAY, MATRIX, IMAGE, or SOLID variable, or a subset of any of these variables (see VARIABLES(1) and SUBSCRIPTS(1)).

FLAG

Use this argument to control whether or not WRITE puts a header block at the beginning of the disk file, and whether the data should be “packed” during transfer to save disk file space. FLAG's values are:

                1-7     - Write data in "packed" format
                 70o    - File format:
                    10o    Short CIGAL modified TIFF format (default)
                    20o    Standard TIFF format
                    30o    BITMAP format
                    40o    PICT format (not implemented yet)
                    70o    Pitt fMRI format
                100o    - don't write a header block (overrides FLAG=2)
              40000o    - Write SOLID as multiple separate matrices
             100000o    - Don't truncate existing file on write

RECSIZE

The number of 8-bit bytes to be transferred in each I/O record. The default record size is 4096 bytes. This argument is ignored if the source VARB already has a record size set(see POINTER(3)).

HDRBYTES

The number of bytes to skip at the beginning of the disk file. Default is 0.

WORDSIZE

The number of bytes per word in the disk file. Default is 1.

See Also:
ARITHMETIC(1), DATADIR(4), FILES(1), INPUT(2), POINTER(3), READ(2), SUBSCRIPTS(1), SYNTAX(1), VARIABLES(1)

CIGAL Home, CIGAL Manual, Commands List, Manual Help

jvs/cigal/manual/chapter2/write.txt · Last modified: 2023/02/23 18:43 (external edit)