Feb 18, 2017, 12:22 PM
Post #4 of 7
Re: [zak100] How to join reversed words into s atring
[In reply to]
This means I have to use the word "my" (without quotes) before using the variables.
Yes, this is called declaring the variables, more precisely, in this case, lexical variables. This, together, with:
makes it possible for the compiler to tell you about many of your mistakes, and it will save you a lot of debugging time.
There is more to it, though. Using lexical variables enables you to precisely decide the scope of your variable, i.e. the part of the code where it exists. And this, in turn, will prevent other often subtle bugs. But that's a different story.