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 />

IOCTL$ Function<br />

Purpose:<br />

To allow GW-BASIC to read a "control data" string from an open character device driver.<br />

Syntax:<br />

IOCTL$([#]file number)<br />

Comments:<br />

file number is the file number open to the device.<br />

The IOCTL$ function is generally used to get acknowledgement that an IOCTL statement<br />

succeeded or failed. It is also used to get device information, such as device width after an IOCTL<br />

statement requests it.<br />

Examples:<br />

10 'GW is a possible command<br />

20 'for get device width<br />

30 OPEN "\DEV\MYLPT" AS#1<br />

40 IOCTYL#1, "GW"<br />

50 'Save it in WID<br />

60 WID=VAL(IOCTL$(#1))<br />

file:///C|/Documents%20and%20Settings/Lorenzo/Desktop/GW%20Basic/IOCTLS.html28/03/2004 21.29.33

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

Saved successfully!

Ooh no, something went wrong!