Programming Guide



sm_fio_a2f

Writes the contents of an array to a file

int sm_fio_a2f(char *file_name, char *array_name);

file_name
The name of the target file.

array_name
The name of a Panther widget that serves as the source array.

Returns

Description

sm_fio_a2f writes the contents of the specified array to a file. The contents of each occurrence are written as a single line to the file.

Example

proc array2file()
vars fileName, retErr

/* get the file name sent from previous dialog */
receive DATA fileName

/* put array's contents into file */
retErr = sm_fio_a2f(fileName, "comments")
if retErr != 0
{
msg emsg "Error - error number :retErr"
}
return

See Also

sm_fio_f2a