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

POS Function<br />

Purpose:<br />

To return the current cursor position.<br />

Syntax:<br />

POS(c)<br />

Comments:<br />

The leftmost position is 1.<br />

c is a dummy argument.<br />

Examples:<br />

10 CLS<br />

20 WIDTH 80<br />

30 A$=INKEY$:IF A$=""THEN GOTO 30 ELSE PRINT A$;<br />

40 IF POS(X)>10 THEN PRINT CHR$(13);<br />

50 GOTO 30<br />

Causes a carriage return after the 10th character is printed on each line of the screen.<br />

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

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

Saved successfully!

Ooh no, something went wrong!