**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 [[jvs:cigal:manual:chapter4:datadir|DATADIR(4)]]). An error message will appear if WRITE cannot create a disk file with the specified name. See [[jvs:cigal:manual:chapter1:files|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 [[jvs:cigal:manual:chapter1:variables|VARIABLES(1)]] and [[biac:jvs:cigal:manual:chapter1:subscripts|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 [[jvs:cigal:manual:chapter3:pointer|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:**\\ [[jvs:cigal:manual:chapter1:arithmetic|ARITHMETIC(1)]], [[jvs:cigal:manual:chapter4:datadir|DATADIR(4)]], [[jvs:cigal:manual:chapter1:files|FILES(1)]], [[jvs:cigal:manual:chapter2:input|INPUT(2)]], [[jvs:cigal:manual:chapter3:pointer|POINTER(3)]], [[jvs:cigal:manual:chapter2:read|READ(2)]], [[jvs:cigal:manual:chapter1:subscripts|SUBSCRIPTS(1)]], [[jvs:cigal:manual:chapter1:syntax|SYNTAX(1)]], [[jvs:cigal:manual:chapter1:variables|VARIABLES(1)]] [[jvs:cigal|CIGAL Home]], [[jvs:cigal:manual|CIGAL Manual]], [[jvs:cigal:manual:chapter2|Commands List]], [[jvs:cigal:manual:help|Manual Help]]