Uppercase vs lowercase clarification - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: Uppercase vs lowercase clarification (/thread-10628.html) |
Uppercase vs lowercase clarification - tcab - 04-30-2018 04:44 AM I prefer programming in lower case, so usually can get away with programming in lowercase eg. Code:
I did have to change the 'not' into NOT however. Can anyone tell me what words cannot be lowercase? And what normal mode (non-cas) functions might clash with lowercase cas functions if they were expressed in lowercase? The reason I am asking is twofold. I want to program in lowercase, for non-cas mode programs. And I want to extend the syntax highlighter for Mac Textwrangler/BBEdit correctly, see my recent post. RE: Uppercase vs lowercase clarification - cyrille de brébisson - 04-30-2018 05:22 AM Hello, ALL the home functions are case insensitive. All the home (and system) variables ARE case sensitive (e, i, HAngle, A-Z, ...) As far as I Can remember, ALL the app specific functions and vars ARE case sensitive CAS functions are lowercase by default, and most of them accept full uppercase variations (they are not case insensitive "per-say" as it is more of an all of nothing type situation). CAS variables are case sensitive. In home, home stull always takes precedent. In CAS, cas stuf takes precedent. Hope that this helps. Cyrille RE: Uppercase vs lowercase clarification - tcab - 04-30-2018 08:13 AM Thank you Cyrille - very helpful! Am still curious why 'NOT' could not be expressed as 'not' ? Its arguably neither variable nor function - an operator, I'd say. So perhaps operators are case sensitive. In fact when I type 'and' into the home screen it auto converts to uppercase AND, supporting the case for uppercase operators. On the other hand, I seem to be able to use lowercase 'and' in a program e.g. Code:
So amongst operators, 'NOT' is case sensitive yet 'AND' is not case sensitive? 'BITNOT' is not case sensitive either and seems ok expressed as 'bitnot'. Is 'NOT' an exception? I haven't checked any other operators yet - pending any more comments/thoughts. RE: Uppercase vs lowercase clarification - cyrille de brébisson - 05-02-2018 05:07 AM Hello, Operators display might be mangled by the 2D display system.Actually, come thinking about this, the display will probably "case correct" any of the build ins as it just records a pointer to the function definition (and it's default case), but does not keep the text hat you entered in memory. as to why not seems to be case sensitive, at a quick glance, it looks like it is due to some speciall hardcodding that is done in the PArser to handle this prefix operator. This code only tests NOT as uppercase. Cyrille |