Omnimaga
Calculator Community => Other Calculators => Topic started by: Hot_Dog on January 20, 2012, 08:31:31 pm
-
In your programming, what have you chosen for an interesting variable name, value, etc. simply because the idea popped into your head, no matter how ilogical it was?
1. One of my label names: NOPQ. I needed a name for a local label, and for some reason I thought of this one
2. Values that mean an enemy should move up, down, left or right in a straight line and not diagonally: $D7 - $D0. Values from 0 to 31 were taken, and the value $D7 just came into my head and wouldn't leave me alone
-
Looking through my Nightmare source I am pleased to say that none of my variables were named arbitrarily ^^, although I can't go as far as saying they are completely descriptive XD Often times I find the variable 'dist' in source code, referencing some kind of distance.
-
For some reasons, in my BASIC games, I always chose the last real variable letter for animations, then go up as I need more. I go from Theta, to Z, Y, X, etc. For some reasons, though, I always used Z for getkey, so whenever I need Z for key detection, I skip it for animations. Also I skip Y if I'm using the graph screen, since ClrDraw and that stuff resets it to zero.
For other things, such as character position and direction, I start with A, B and so on.
-
I use C for key-press storage, and a/b and d/e for storage of variables for drawing tools.
-
I always gave meaningful names to variables, like K for getKey, X and Y for position, A and B for previous values of X and Y, etc. Oddly I always used the full 8 characters limit for program names. ASDFASDF is a pretty good name as well.
-
I normally try to do some acronym or another, but sometimes I forget what it means (I still can't remember some of them as far back as TWHG) :P
Normally for variables I use placement on the keypad, so there'd be the normal X,Y and the forces acting on those are S,T because they're the keys just above. If there's another thing with similar vars, I might use IJNO or UVZΘ and etc.
-
I try to give logical names, like Lbl APD to "turn off" the calc (set contrast to 0 :P) or Lbl FAC to clear the box (only french people can see what I did here)
But for random and/or temporary labels, I give names like VH7 :P
As for variables, what I do might not seem logical to everybody but I always use the same scheme for all my programs ;)
-
so there'd be the normal X,Y and the forces acting on those are S,T because they're the keys just above.
I do exactly the same :D Except when it's Basic and we have to use X Z because Y is silly D:
-
I always use X and Y for inflated coordinates, S and T for uninflated, A and B for velocity ^^
-
I use theta for GetKey cuz... that's what I've always used. And then I use Z for my loops, usually Repeat, and if there are nested loops, I use Y, X, and so on. For character position I tend to use A and B, C and D, and so on. Usually if there is gravity involved I would use G for that, if not, I use G for storing Gold (any currency in game even if not named Gold).
Any other variables I just choose randomly :P
-
well, I once had a label Wlrus()
it was my display routine :P
-
K for getkey, anything else is either initials/first letter or just A then B then C,etc.