17.07.2013 Views

GWBASIC User's Manual

GWBASIC User's Manual

GWBASIC User's Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GW-BASIC <strong>User's</strong> Guide<br />

188 n FIELD Actual FIELD data buffer. Size is determined by S:switch.<br />

VRECL bytes are transferred between BUFFER and FIELD on I/<br />

O operations. Use this offset to examine file data in random I/O<br />

mode.<br />

Example 1:<br />

100 X=VARPTR(Y)<br />

When executed, the variable X will contain an address that points to the storage space assigned to<br />

the variable Y.<br />

Example 2:<br />

10 OPEN "DATA.FIL" AS #1<br />

20 FCBADR = VARPTR(#1)<br />

30 DATADR = FCBADR+188<br />

40 A$ = PEEK(DATADR)<br />

In line 20, FCBADR contains the start of FCB.<br />

In line 30, DATADR contains the address of the data buffer.<br />

In line 40, A$ contains the first byte in the data buffer.<br />

file:///C|/Documents%20and%20Settings/Lorenzo/Desktop/GW%20Basic/VARPTR.html (3 of 3)28/03/2004 21.29.51

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!