PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Douglas McDonald on January 03, 2011, 12:48:35 PM

Title: Maintain Variable Case
Post by: Douglas McDonald on January 03, 2011, 12:48:35 PM
This ones way down the list but its nice to have an makes the code more readable and easier to write for lazy people like me.

It would be nice if once a variable is defined its case is maintained throughout the rest of the code. Many compilers do this. If FF3 does I can't find where to turn it on.

Example:

Local MyVar as long

next time I use myvar it maintains the case to MyVar

Its just a nice to have item and Ive gotten used to it in other editors

Doug
Title: Re: Maintain Variable Case
Post by: Rolf Brandt on January 03, 2011, 02:20:34 PM
Yes, that would be a nice feature. I had suggested it also a while ago.

The biggest benefit I see in it is that you have instant control if the variable name is spelled properly. You won't have to wait until the compiler alerts you of it.
Title: Re: Maintain Variable Case
Post by: Peter House on January 04, 2011, 10:10:38 AM
That was a very nice feature of VB.  The only problem with VB was it used the last instance you changed to change all the other instances (as I recall) whereas I would prefer it to go by the declaration of the matching variable name.



Title: Re: Maintain Variable Case
Post by: Rolf Brandt on January 04, 2011, 12:39:51 PM
VB changed it only to the last instance if you did not declare the variable. If you used Option Explicit you had to declare the variable, and then it was always changed to the spelling you used in the declaration.
Title: Re: Maintain Variable Case
Post by: Peter House on January 04, 2011, 03:28:52 PM
I used VB since version 1 and that sounds about right to me.  I always used Option Explicit after it appeared (in v3 ???).

Peter