forums

TNT Basic Forums > Programming Q&A
Commander Data
< Last Thread     Next Thread >
Author
Thread        Post A Reply

03-07-2002 03:35

Posted by:
Louis!

Find more posts by Louis!

I pretty much get the idea of using the DATA and read commands.. I write something like:
read x,y,z


data tnt, is, cool

And the variables now contain this:
x=tnt
y=is
z=cool

but how do you read if you have multiples lines of data statements? Like so:
data 1,3,5,7,4
data 7,3,9,2,1
data 8,5,6,4,3

03-07-2002 07:07

Posted by:
John Treece-Birch

Find more posts by John Treece-Birch

Data Statements

When you read off the end of one line, it just continues on the next.

Hope that helps,
John

03-07-2002 09:02

Posted by:
Mark Tully

Find more posts by Mark Tully

Restore

You can also use the 'restore' command to change where you are reading from. E.g.

read a,b
restore label2
read b,c

data 1,2,3,4,5
label2:
data 10,11,12,13

Hope this helps,

Mark

03-08-2002 04:52

Posted by:
Louis!

Find more posts by Louis!

Great! Thanx most helpfull!.. I will dable in it to firmly grasp it.. but I think I've got it.

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.