Hello,
I have a very singular issue with this script :
@echo off
set /p L=L?
set /p l=l?
set /a s=%L%*%l%
echo s = %s%
pause
If L=5 and l=4, it gives me 16 as a result !!!! (L stands for Large and l stands for lentgh )
But if I replace L and l by a and b, it works perfectly
How comes ???
Thx a lot
Weird arithmetic error in a simple script
Moderator: DosItHelp
Re: Weird arithmetic error in a simple script
Environmental variables are NOT CASE SENSITIVE!
Re: Weird arithmetic error in a simple script
Waw ... so stupid of me... Thanks a lot
Re: Weird arithmetic error in a simple script
Lamcourt wrote:Waw ... so stupid of me... Thanks a lot
But remember that FOR variables are case sensitive.
Re: Weird arithmetic error in a simple script
Lamcourt wrote:L stands for Large and l stands for lentgh
The unmeasurable question: if you want that one variable stands for Large and the other one for length, why don't you name them "Large" and "length"? Variable names may be many characters long. Please, do not ask how many characters a variable name can have!
Antonio