WRITEF@

Platform

x64, Win32

Purpose

To write binary data to a file.

Syntax

SUBROUTINE WRITEF@(DATA,SID, NBYTES, ERROR_CODE)
CHARACTER (LEN=*) DATA
INTEGER (KIND=2) SID, ERROR_CODE
INTEGER (KIND=3) NBYTES

Description

Writes NBYTES of binary data DATA to the file with the given identifier SID. ERROR_CODE is returned as zero for success or a system error code on failure. No data compression on insertion of control characters is performed.

Notes

If the input value of NBYTES is supplied as a constant, it is usually necessary to force its length to 4 bytes (append L to the decimal value).

If compiling for 64-bits (only) there is an extra long version of this routine that can write data chunks in excess of 2GB:

SUBROUTINE WRITEFLONG@(DATA,SID, NBYTES, ERROR_CODE)
CHARACTER (LEN=*) DATA
INTEGER (KIND=2) SID, ERROR_CODE
INTEGER (KIND=4) NBYTES

See also

OPENR@, OPENRW@, OPENW@, READF@, READFA@, WRITEFA@, CLOSEF@, FPOS@, FPOS_EOF@

 

 

Basket
Empty
 
Copyright © 1999-2020 Silverfrost Limited