FBInWrite
FBinWrite [/B[=b ]/F=f ] refNum, objectName
The FBinWrite operation writes the named object in binary to a file.
Parameters
refNum is a file reference number from the Open operation used to open the file.
objectName is the name of a numeric variable, string variable, structure, or wave.
Flags
| /B[=b ] | Specifes file byte ordering. | ||||||||||||||
| |||||||||||||||
| /F=f | Controls the number of bytes written and how the bytes are formatted when written. | ||||||||||||||
| |||||||||||||||
| /P | Adds an IgorBinPacket to the data. This was used for PPC result packets (refNum = 0) and is not normally of use when writing to a file. | ||||||||||||||
| /U | Integer formats (/F=1, 2, or 3) are unsigned. If /U is omitted, integers are signed. | ||||||||||||||
Details
A zero value of refNum is used in conjunction with Program-to-Program Communication (PPC) ActiveX Automation (Windows). The data that would normally be written to a file is appended to the PPC or ActiveX Automation result packet.
If the object is a string variable then /F doesn't apply. The number of bytes written is the number of bytes in the string.
The binary format that FBinWrite uses for numeric variables or waves depends on the /F flag. If no /F flag is present, FBinWrite uses the native binary format of the named object.
Byte ordering refers to the order in which a multibyte datum is written to a file. For example, a 16-bit word (sometimes called a "short") consists of a high-order byte and a low-order byte. Under big-endian byte ordering the high-order byte is written to the file first. Under little-endian byte ordering the low-order byte is written to the file first.
FBinWrite will write an entire structure to a disk file. The individual fields of the structure will be byte-swapped if the /B flag is designated.
The FBinWrite operation is not multidimensional aware. See Multidimensional Waves, particularly Analysis on Multidimensional Waves for details.