Just curious, when writing code and giving variable and I suppose constants names does the length of the name matter when it come to compiling? Will a longer name take up more space?
No.
Only in the text files. Once the code is compiled the names are gone.
a7
Thanks
Using long, descriptive variable names can be very useful in understanding the logic of a program but typing them can become tedious.
A little known trick in the IDE for the last few versions is to use the IDE to auto complete the names of previously used variables for you. Suppose that you have declared a variable named playerXStartPosition then want to enter
if (playerXStartPosition > 123)
If you enter
if (p
and hold down Ctrl and press Enter the IDE will fill in the full name of the variable for you. If there are several possible matches then subsequent presses of Enter will cycle through them in turn. I have not found a way to go backwards through the list of matches, nor is the mechanism completely foolproof
I recently discovered that it works with function names too, even the built in functions such as digitalRead() and digitalWrite()