LoginLogin

How can I use DATA, READ and RESOTRE?

Root / Programming Questions / [.]

🔒
joelableCreated:
I've always wanted to know but I just never get the hang of it.

Of course there's a typo in my thread title -.-

Okay so with DATA you can store numbers and strings like: DATA "ABC" and DATA 123. And also DATA "ABC", 123. READ reads the data in order and saves it into a variable like: READ L$ and READ L. RESTORE can have data start getting read from a certain label like: RESTORE @DATA1 READ L$ READ L @DATA1 DATA "ABC", 123 I hope this helped.

Yeah, it shed a little light. Thanks!

You can also check the tutorial I created in the resources tab.

I did, and I'm starting to get the hang of it. But can't the same thing be done by just using DIM and doing each variable individually? EDIT: I can see why DATA is used. Thanks for the tutorials, it's now much easier to do stuff with a lot of values.