0

enter image description here

//Im confused on what the 'V's and 'L' stand for, which ones do I choose? This always happens and confuses me on which variabel I Should choose; they both have the same name but there's an 'L' and a 'V' for these 2 variables: speed and speedLimit???

Ali
  • 505
  • 4
  • 12
  • possible duplicate of [Xcode intellisense meaning of letters in colored boxes like f,T,C,M,P,C,K,# etc](http://stackoverflow.com/questions/6662395/xcode-intellisense-meaning-of-letters-in-colored-boxes-like-f-t-c-m-p-c-k-etc) –  Sep 05 '15 at 16:13

1 Answers1

2
  • L = Local Variable (the scope is restricted to the space betweeen the braces)
  • V = Instance or Global Variable

For code completion it doesn't matter whether you choose V or L, the compiler will do the right thing.

vadian
  • 274,689
  • 30
  • 353
  • 361
  • ahh I see, you completely cleared the confusion......I was actually choosing whichever variable because they both had the same name and type......that probably mixed up my code where I needed to put a local, I probably put a global and vise versa , maybe I should go and rewrite those? @vadian – Ali Sep 05 '15 at 16:22
  • 1
    Rewriting is not necessary, it's even recommended to use the same name for instance variable and parameter name. – vadian Sep 05 '15 at 16:26