PDA

View Full Version : Variable case sensitivity



NewsArchive
04-29-2005, 04:24 AM
Friedrich,

In 5.0.1116 I have a number of variables declared in the main script that are
referenced in included scripts. Recompiling a script today, I've got a
compiler error from an include that a variable has not been previously
defined.

That variable is defined as %LPRODUCTCODE% at line 125 of the main script.
The include is at line 328, so it shouldn't be a scope issue.

As I was writing this I noticed a case issue for the single variable
%LPRODUCTCODE%. It is (unintentionally) declared in uppercase, but used in
lower in a function call with all these other doo-dads.

%szExePath%,%szDataPath%,%szProgVersion%,%szLicens ee%,%szSupportExpires%,%lProductCode%,%lUpdateOk%, %lLicenseType%,%lLicenseOptions%

Has SB become case sensitive (it hasn't been until this compile)? I hope not
because I can read the line above. The one below, which I hope I don't need
to use, reads like I talk after a couple of joints.

%SZEXEPATH%,%SZDATAPATH%,%SZPROGVERSION%,%SZLICENS EE%,%SZSUPPORTEXPIRES%,%LPRODUCTCODE%,%LUPDATEOK%, %LLICENSETYPE%,%LLICENSEOPTIONS%

--
Best regards,

Mark

NewsArchive
04-29-2005, 04:25 AM
Hi Mark,

Variables in SB5 have always been case-sensitive ;-)

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

NewsArchive
04-29-2005, 04:25 AM
>Hi Mark,
>
>Variables in SB5 have always been case-sensitive ;-)
>
>Friedrich

Ok, but when did it start forcing upper on new/edited variables? I realized
how %LPRODUCTCODE% became upper after deleting it and attempting to re-enter
it as mixed case. Before the compile that produced the error, I edited that
variable to changed its assigned value for a new project. I understand now
that it was forced to upper by the edit, and new variables are forced to
upper.

I can live with whatever you need on case, but forcing case on edit broke the
script. Seems kind of hyper-sensitive, wouldn't you think?

Ok, I'll stop whining and resign my self to actually touching caps lock when
I start SB. :}

--
Best regards,

Mark

NewsArchive
04-29-2005, 04:25 AM
Hi Mark,

Hmm, I fear I do not understand :( What changed in one of the latest
builds? I think I have not modified the variable thing. When I use "Set
Variable" it always upper-case here on our test machines.

Thanks,
Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

NewsArchive
04-29-2005, 09:28 AM
>Hi Mark,
>
>Hmm, I fear I do not understand :( What changed in one of the latest
>builds? I think I have not modified the variable thing. When I use "Set
>Variable" it always upper-case here on our test machines.

Friedrich,

Have a look.

--
Best regards,

Mark
sbvarcase.png

NewsArchive
04-29-2005, 09:28 AM
Mark,

Very interesting... Do you know how to reproduce this?

Thanks,
Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

NewsArchive
05-03-2005, 01:15 AM
>Mark,
>
>Very interesting... Do you know how to reproduce this?

Friedrich,

Well, of course. Revert to an unknown prior version. :}

Seriously, I understand now that the behavior I took advantage of was
unintended. I'm ok with that.

--
Best regards,

Mark

NewsArchive
05-03-2005, 01:15 AM
Mark,

Okay, thank you. Just to be on the safe side - in build #1120 "Set
Variable" always creates upper-case variable names, right?

Thank you for your time!

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

NewsArchive
05-03-2005, 01:15 AM
>Mark,
>
>Okay, thank you. Just to be on the safe side - in build #1120 "Set
>Variable" always creates upper-case variable names, right?

Friedrich,

I haven't had time to grab 1120 yet, but I can assure you that 1116 does.

--
Best regards,

Mark