### Author Topic: GDB vs Pic  (Read 328 times)

0 Members and 1 Guest are viewing this topic.

#### The VFX Wizard

• LV1 Newcomer (Next: 20)
• Posts: 8
• Rating: +0/-0
##### GDB vs Pic
« on: March 21, 2018, 09:57:30 pm »
I was wondering what the difference was between GDB and Pic as they seem to do the exact same thing and use the same hex codes. Is there a time you would use GDB over Pic? Thanks!
5 Things I hate the most: lists, irony, lists, repitition, typos, and the Oxford comma

#### Streetwalrus

• LV12 Extreme Poster (Next: 5000)
• Posts: 3820
• Rating: +80/-8
##### Re: GDB vs Pic
« Reply #1 on: March 22, 2018, 08:29:12 am »
They're functionally the exact same thing, it's just a matter of semantics. It's the general consensus to use Pic* for sprites and other graphical data, and GDB* for other types of data. But nothing beats using custom names with the ° symbol in terms of readability.
send it

#### The VFX Wizard

• LV1 Newcomer (Next: 20)
• Posts: 8
• Rating: +0/-0
##### Re: GDB vs Pic
« Reply #2 on: March 22, 2018, 09:01:28 am »
I'm sorry, I don't know what you mean by the degree symbol.
5 Things I hate the most: lists, irony, lists, repitition, typos, and the Oxford comma

#### Eeems

• Mr. Dictator
• LV13 Extreme Addict (Next: 9001)
• Posts: 6110
• Rating: +317/-36
• C'est la vie
##### Re: GDB vs Pic
« Reply #3 on: March 23, 2018, 12:32:56 pm »
I'm sorry, I don't know what you mean by the degree symbol.
Search for °VAR in https://axe.eeems.ca/Commands.html
/e

#### johnbchron

• LV1 Newcomer (Next: 20)
• Posts: 19
• Rating: +1/-0
• RiskALungForDiving
##### Re: GDB vs Pic
« Reply #4 on: March 23, 2018, 02:17:02 pm »
Wait a sec, so you can type:
Code: [Select]
15 -> °FOOand it will store to foo?!?
Just a dude who is really bored in school... and a huge nerd.

#### Streetwalrus

• LV12 Extreme Poster (Next: 5000)
• Posts: 3820
• Rating: +80/-8
##### Re: GDB vs Pic
« Reply #5 on: March 23, 2018, 03:47:02 pm »
Yes, though that is a constant. You can make that constant a memory location and use it as a pointer, or use it just like Pic*, GDB*, and others.
send it

#### johnbchron

• LV1 Newcomer (Next: 20)
• Posts: 19
• Rating: +1/-0
• RiskALungForDiving
##### Re: GDB vs Pic
« Reply #6 on: March 23, 2018, 04:12:50 pm »
So it would make more sense to say
Code: [Select]
blah blah -> °86ECwhich would put it in L1?
Just a dude who is really bored in school... and a huge nerd.

#### E37

• Posts: 240
• Rating: +13/-0
• I own two game consoles- a ti- 83 and a ti- 84!
##### Re: GDB vs Pic
« Reply #7 on: March 25, 2018, 06:40:36 pm »
The o means that what follows is the memory location not the variable. {oA}r is exactly the same as A. It lets you make custom variables.

:L5->oVariableName
:25->VariableName
:Disp VariableName>Dec

In fact, VariableName can be anything you want! It can be as long as you want and contin numbers and lowercase letters as long as it doesn't start with a lowercase letter or number. You can also make as many as you want! (There is tecnically a limit but you will never hit it) These custom named variables can be used in ANY situation you could have used an Alpha variable. Note that each one takes up two bytes so if you place one at L5 then the next one should be placed at L5+2 and so on. There is no reason not to use them. They are just as fast as Alpha variables. In fact, the only difference between a custom named variable and the Alpha variables is the space they take up in the source code.

The o can be used for data also.

:"Im a string!"->oVariableName
:Disp oVariableName

Is the exact same as

:"Im a string!"->Str1
:Disp Str1

Notice that you need the o when it points to data. The symbol means that you want to use it as a constant and not a variable just like GDB or Str. It is useful for constants also. If you need map width and height in your program but don't need them to change while it is running make them constants. That way if you need to change the dimensions of the map, all you have to do is change the one line where they are declared.

Sorry I'm a bit late to the party...
Good things come in bags marked "SWAG"

#### Streetwalrus

• LV12 Extreme Poster (Next: 5000)
• Posts: 3820
• Rating: +80/-8
##### Re: GDB vs Pic
« Reply #8 on: March 26, 2018, 12:02:21 pm »
That's a good explanation of it, thanks for doing my job.
send it