basic.%freopen

C Function/BASIC Program, Releases: AP/Unix

Reopens a stream.

Syntax

stream=(char*)%freopen( string, type, (char*)stream1)

Description

substitutes the named file specified by 'string' in place of the opened stream 'stream1'.

The stream is returned as a pointer to a character or 0 (zero) if an error has occurred. System(0) is then set to the error number.

See Also

Command Name Type Description
basic.cfunc Definition can be called from a Pick/BASIC program or subroutine in AP/DOS and AP/Unix implementations using a syntax similar to that of normal C.
basic.%fopen C Function Opens a stream.
basic.%fdopen C Function Associates stream with a file.descriptor.
basic.cfunction Definition Declare a list of C functions.
basic.%fclose C Function Closes stream.

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.