; FGA_ArrayWrite
; --------------
; Writes a 1D/2D array to disk as binary data
; Uses optimized C++ code in FGA_ArrayWriteMtd to write array
;     @error:    1 = $sFile is an invalid file name
;                2 = $sFile exists and $bOverWrite is False
;                3 = $aArray is not an array or is a larger than 2D array
;                4 = String buffer $iStrBufSize is too small
;                5 = FGA_GeneralInitDll has not been run
; FGA_ArrayWrite( _
;     $sFile, _           ; Name of the disk files, 3 files
;     $aArray, _          ; The 1D/2D array to write to disk
;     $iStrBufSize = 1, _ ; Maximum size in megabytes of buffer to store strings
;     $bOverWrite = 0 )   ; True (1) to overwrite existing files

; Writes a 1D/2D array to disk as binary data.
; The internal data type (as returned by VarGetType) of array elements is retained.

; FGA_ArrayWrite writes the entire safearray structure of variants to disk as binary data. Three files are created on the disk.
; Two binary files <$sFile>.bin that contains the safearray data structure and <$sFile>.bstr containing the strings. And also a
; text file <$sFile>.ini that contains one row with number of dimensions, rows and columns in the array separated by blanks.
;
; For some data types the data is not stored directly in the variant structure. Instead of the variant structure contains a poin-
; ter to the data. These data types includes strings, arrays (arrays of arrays), functions, objects, structures and maps (in the
; beta version). Of these data types only STRINGS are handled by FGA_ArrayWrite.

; $iStrBufSize parameter:
; Before strings can be written to disk, they are temporarily stored in a DllStruct buffer. $iStrBufSize is the maximum size in
; megabytes of this buffer. If the buffer is too small for all strings in the array, FGA_ArrayWrite returns with an error and
; the array will NOT be written to disk. Only the part of the buffer that's filled with strings is written to disk.


; FGA_ArrayRead
; -------------
; Reads a 1D/2D array from disk files
; The disk files must have been saved with FGA_ArrayWrite
; Uses optimized C++ code in FGA_ArrayReadMtd to read array
;     @error:    1 = $sFile is an invalid file name
;                2 = $sFile (3 files) does not exist
;                3 = Invalid dims/rows/cols info in <$sFile>.ini
;                4 = Size of <$sFile>.bin doesn't match rows/cols
;                5 = FGA_GeneralInitDll has not been run
; FGA_ArrayRead( $sFile ) ; Name of the disk files, 3 files

; Reads a 1D/2D array from disk files. The disk files must have been saved with FGA_ArrayWrite.
; The internal data type (as returned by VarGetType) of array elements is retained.
