Bug 4.31 variables ?
Bug 4.31 variables ?
Hi,
I believed a global CARD$ was different than a local card$ in a procedure ? Did I ever missed they were the same ? I'm surprised, pretty sure was different, as one is in uppercase, over in lowercase....
I believed a global CARD$ was different than a local card$ in a procedure ? Did I ever missed they were the same ? I'm surprised, pretty sure was different, as one is in uppercase, over in lowercase....
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
the Case does not distinguish Names in PureBasic, it never did!
both names are the same, you could even write Card$
if you want a different Var than the Global in a Proc, use
if you need both Variables, use different names for them, e.g. G_Card$ and L_Card$ (Global and Local)
both names are the same, you could even write Card$
if you want a different Var than the Global in a Proc, use
Code: Select all
Protected Card$
oh... and have a nice day.
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
To be honnest, it did, but a very very long time agoKaeru Gaman wrote:the Case does not distinguish Names in PureBasic, it never did!

Code: Select all
27 January 2002 : Version 2.90
- Changed: Variables, Arrays, LinkedList and Constants are now case insensitive.
Im really (really really) cheerfull that you did this step.Fred wrote:To be honnest, it did, but a very very long time agoKaeru Gaman wrote:the Case does not distinguish Names in PureBasic, it never did!
Code: Select all
27 January 2002 : Version 2.90 - Changed: Variables, Arrays, LinkedList and Constants are now case insensitive.
There is nearly nothing, which is more annoying me then case-sensitive-bugs. In my opinion it increaes, combined with a good editor, the readability of code (auto correction).
pb 5.11
Combined with EnableExplicit I don't think case sensitivity would be a problem.gnasen wrote:Im really (really really) cheerfull that you did this step.
There is nearly nothing, which is more annoying me then case-sensitive-bugs. In my opinion it increaes, combined with a good editor, the readability of code (auto correction).
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
iN mY opIniOn It deCreaSeS A loT thE ReaDaBiLiTY!gnasen wrote:In my opinion it increaes, combined with a good editor, the readability of code
'D' is a symbol and i don't see there anything to do with the symbol 'd'.
Your brains are very well educated to do a work:
convert 'D' to 'd' or viceversa
Work which is a nonsense, of course, because it could be easely saved.
And and and doesn't mean the same, right? They never did, right? Oh wait, I think they do!'D' is a symbol and i don't see there anything to do with the symbol 'd'.
At first they had only uppercase letters. They made the others for readability. The readability increases when upper- and lowercase letters are mixed in the correct way. If they are mixed in an incorrect way decreased readability occurs.
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
PB editor allows to do "decreased" readability, because it allows things like this:Trond wrote:...If they are mixed in an incorrect way decreased readability occurs.
Code: Select all
varia.f+rition.f
;code...
;code...
;code...
vARiA.F-rItiON
Code: Select all
Co_mols=3E23
CO_mols=1.2E32
while CO is carbon monoxide

IMHO, it's better than having several identifiers which holds differents values with the 'same' name.
Code: Select all
sum = 10
Sum = 20
SuM = 30
SUM = 40
Debug Sum
you only have to suffer from dyslexia to know that languages like C are a pain in the butt when it comes to finding a bug due to a case sensitive variable that's not the same as it was declared.
So I'm really glad PB is case insensitive, lets me get on with coding as opposed to trying to find silly bugs.
fi uoy nac dear shit tithouw ghinkint uoy era yrobablp cyslexid
So I'm really glad PB is case insensitive, lets me get on with coding as opposed to trying to find silly bugs.
fi uoy nac dear shit tithouw ghinkint uoy era yrobablp cyslexid