SourcePoint AMD Help

Table of Contents

fputs

Write a string to a file.

Syntax

fputs(string, file_handle)

Where:

string

is a string constant or nstring variable to write.

file_handle

is the file handle returned from a previous fopen command

Discussion

The fputs function writes a string to a file previously opened by an fopen command.

Example

Command input:

define ord4 file1
file1 = fopen("test.dat", "w")
fputs("this is a test", file1)
fclose(file1)
define nstring buf
file1 = fopen("test.dat", "r")
fgets(buf, file1)

Result:

"this is a test"

Related Topics: