Jump to content



1

Label Names (Do capital letters make a difference?)


3 replies to this topic

#1 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,923 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Mon Sep 19, 2011 11:33 AM

It says on the bB page that a label must not match or begin with a known keyword or any labels internal to bB.

But if we start label names with a capital letter, isn't it true that we won't have to worry about that? I was thinking that it might be a good idea to start label names with an underscore so we'd never have to worry about it, but if a capital letter would do the job, I'd rather go with that.

Does anyone know if any internal bB labels use capital letters?



Thanks.

#2 disjaukifa OFFLINE  

disjaukifa

    River Patroller

  • 2,088 posts
  • Berzerker In Training
  • Location:Southwest Virginia

Posted Mon Sep 19, 2011 12:15 PM

I can't answer the question about the internal working of bB, but from a programming perspective I find starting variable with _myVariable is a better solution because its easier at a quick glance to see which variables are yours specifically and which are reserved.

#3 RevEng OFFLINE  

RevEng

    River Patroller

  • 2,010 posts
  • bit shoveler
  • Location:Canada

Posted Mon Sep 19, 2011 12:18 PM

There's a few that begin with caps, but I don't think you're likely to collide with them...

BS_return, BS_jsr, DPC_graphics_end, Hmval, Hmval74, HMdiv, HorPosLoop, DivideLoop, MachineIs2600, Zeros32, SOUND_OFF, DisplayDataDigitBlank, SINE_WAVE, TRIANGLE_WAVE, SAWTOOTH_WAVE, SQUARE_WAVE_VOL5, SQUARE_WAVE_VOL4, SQUARE_WAVE_VOL3, NOISE_WAVE, FETCHER_BEGIN, Assign88to44, Assign44to88, Assign88to44bs, Assign44to88bs, Add88to44, Sub88from44, Add44to88, Sub44from88, MSK_scrolldown, FineAdjustTableBegin, FineAdjustTableEnd, PFStart, SetCopyHeight, WaitForOverscanEnd, WaitForVblankEnd, PositionASpriteSubroutine, DivideBy15Loop, PrePositionAllObjects, KernelSetupSubroutine, AdjustYValuesUpLoop, MaskTable, SwitchDrawP0K1, WaitDrawP0K1, SkipDrawP1K1, KernelRoutine, KernelLoopa, KernelLoopb, BackFromSwitchDrawP0K1, BackFromSkipDrawP1, BackFromRepoKernel, SwitchDrawP0KR, WaitDrawP0KR, RepoKernel, BackFromSwitchDrawP0KR, DivideBy15LoopK, BackFromSwitchDrawP0KV, SetNextLine, SetLastLine, SwitchDrawP0KV, WaitDrawP0KV, DoneWithKernel, BottomOfKernelLoop, OverscanRoutine, KernelCleanupSubroutine, AdjustYValuesDownLoop, SetupP1Subroutine, MachineIs2600, HorPosLoop, DivideLoop

#4 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,923 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Mon Sep 19, 2011 12:37 PM

View PostRevEng, on Mon Sep 19, 2011 12:18 PM, said:

There's a few that begin with caps, but I don't think you're likely to collide with them...
Thanks. Wow, I could see someone possibly using a few of those by mistake. I think I'll start all of my labels with an underscore so I'll never have to worry about it.

I might start labels with 2 underscores and variables with one underscore.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users