Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
JSN
21
Years of Service
User Offline
Joined: 8th Nov 2003
Location: 127.0.0.1
Posted: 28th Nov 2003 17:50
YEARS AGO

I use to program computer in Basic, and I'd often use the Read and Data commands.

I hate to admit but I've totally forgotton everything about them, and I'm sure I can do the following...

Suppose I have a data statement like...

DATA 1,2,4,6,2,5,4,2,3,34,23,1,4,12,13,14

What I want to end up with is to read the data and have the following...

varA(1)=1
varA(2)=2
varA(3)=3
varA(4)=4

varB(1)=2
varB(2)=4
varB(3)=34
varB(4)=12


varC(1)=4
varC(2)=4
varC(3)=23
varC(4)=13


varD(1)=6
varD(2)=2
varD(3)=1
varD(4)=14

Anyone know if this is possible 'cos it would be a god-send.

~ J ~
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 28th Nov 2003 17:57
very possible, heres an example it doen't do exactly what you want ie. it just reads the data in order, but you could sort it aswell.




GO TO THE ETERNAL DESTINY FORUMS!!! http://forums.eternaldestinyonline.com
Do it now!!!
JSN
21
Years of Service
User Offline
Joined: 8th Nov 2003
Location: 127.0.0.1
Posted: 28th Nov 2003 18:14
I think the sorting might have been sheer coincidence.

That looks fine, many thanks, been about 10 years since I used anything like that - lol

~ J ~
CoTang
21
Years of Service
User Offline
Joined: 18th Nov 2003
Location:
Posted: 28th Nov 2003 21:19
Better to have the script in a separte encoded file, makes things easier to look at instead of having a big data statement on the bottom. Never really did like that....
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 28th Nov 2003 21:58
or break out each set of data into seperate subs, for organization and stuff

-RUST-

Login to post a reply

Server time is: 2024-11-25 18:21:32
Your offset time is: 2024-11-25 18:21:32