Author Topic: Programming help  (Read 1930 times)

0 Members and 1 Guest are viewing this topic.

Offline trevmeister66

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1009
  • Rating: +14/-5
    • View Profile
Programming help
« on: April 20, 2007, 07:24:00 pm »
Ok, now that i've finally gotten back into programming, i've found out i don't know some things that i think should be easy. (These are all for 83+ BASIC)

1) How do u change a string value into a variable?

ex:
"13->Str0
Str->A   // What do i do here?
Disp A

2) Could someone explain Appvars and how they work? (I'm using celtic2 and was wondering what they are).

3) Is there a way to do a 2 dimensional array/list in BASIC?

4) There's probably more stuff, but i can't think of anything right now, will post when i do think of something.
Projects:    nameless RPG: 1.0%  |  Reverse Snake v1.5: 100%  |  Secret Project: 5%  |  DUNGEON: 70%

My MW2 Blog <-- Please visit :)

Liazon

  • Guest
Programming help
« Reply #1 on: April 21, 2007, 04:07:00 am »
3.)  doesn't the calc have matrices you could use?  but all the good basic programers tell me they decompress strings for storage though.

Offline trevmeister66

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1009
  • Rating: +14/-5
    • View Profile
Programming help
« Reply #2 on: April 21, 2007, 08:32:00 am »
lol wow, i can't believe i forgot about matrices. Don't they tend to get fairly big sometimes though?
Projects:    nameless RPG: 1.0%  |  Reverse Snake v1.5: 100%  |  Secret Project: 5%  |  DUNGEON: 70%

My MW2 Blog <-- Please visit :)

Insanity

  • Guest
Programming help
« Reply #3 on: April 21, 2007, 08:54:00 am »
QUOTE
1) How do u change a string value into a variable?

ex:
"13->Str0
Str->A // What do i do here?
Disp A


"13
expr(Ans
Disp Ans

QuoteBegin
-->
QUOTE
2) Could someone explain Appvars and how they work? (I'm using celtic2 and was wondering what they are).


Application variables.  They're used by applications and some assembly programs to remember things (e.g., highscores and preferences) and use them again next time you run the program.

QuoteBegin
-->
QUOTE
3) Is there a way to do a 2 dimensional array/list in BASIC?


One word:  matrices.

QuoteBegin
-->
QUOTE
4) There's probably more stuff, but i can't think of anything right now, will post when i do think of something.


'K.

Offline dinhotheone

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 410
  • Rating: +2/-1
    • View Profile
Programming help
« Reply #4 on: April 25, 2007, 01:26:00 pm »
actually to be blunt matrices suck. most good programmers will tell you to use strings. for example, you can change a 60 element string into a 10x6 matrice with a little ingenuity and multiplication knowledge. basically to get the element you want you just take the x position (if you think about it as a matrice) and then take the y position and multiply that by the (width - 1) then add those 2 together and wala you have turned a string into a matrice(x+y(W - 1)). the only problem is you cant have decimals but on the upsidde, they are faster, lighter more flexible and can store almost anything you can input into the calculator. (if decimals are a problem use lists)