PROGRAM XXX INTEGER FNOM, IERR, BUF(1000) C ASSOCIATION OF UNIT 12 TO FILE 'XYZ' IERR = FNOM(12,'XYZ','RND',0) C OPENING THE FILE CALL WAOPEN(12) C SOME READING CALL WAREAD(12,BUF,81,1) CALL WAREAD(12,BUF(100),17,100) C WRITING TO THE FILE CALL WAWRIT(12,BUF,200,1) C CLOSING THE FILE CALL WACLOS(12) STOP END
main() { int c_fnom(), ierr; int BUF[1000]; /* connecting unit 12 to the file xyz */ ierr = c_fnom(12,'xyz','RND',0); /* opening the file */ c_waopen(12); /* reading */ c_waread(12,&BUF,81,1); c_waread(12,&BUF[99],17,100); /* writing */ c_wawrit(12,&BUF,200,1); /* closing the file */ c_waclos(12); exit(0); }
AUTHOR
Mario Lépine - RPNNOTES
Warning: Do not mix different I/O access to the same file (ex: writda, wawrit).
Buffering configuration can be controlled via the WA_CONFIG environment variable for performance issue.
SEE ALSO
( waopen, wawrit, waread, waclos)