Newbie Question 5 of N
Richmond Mathewson
richmondmathewson at gmail.com
Sun May 10 03:42:45 EDT 2009
Well, as well as all the other useful things that everybody is proposing
how about a sort of "Top of the Pops" of errors?
My personal favourite crops up all the time:
flase, fales, flsae . . . but, very rarely 'false'
Now . . . variables . . .
--------------------------------------------------------------------------------------------
Pompous Section starts here.
--------------------------------------------------------------------------------------------
Way back when, 'while dinosaurs ruled the earth' (as my kids say),
I was studying PASCAL 5, and rapidly discovered the easiest way to
keep track of variables was to stop calling them names such as 'X',
'Y' and 'Z'.
Having jumped from PASCAL and BASIC to Hypercard without looking
sideways I have always followed the following policy:
name variables in such a way as they have some connexion with
what they do.
for instance; if you poke around in my stacks you will find variables
with names such as 'KOUNT1', 'ADDER'. 'HITE', 'WIDD', and a whole
lot with either Scots or Bulgarian names, which proves useful when
the obvious names for those variables in English are reserved words.
similarly with fields, which I always prefix with a lower case 'f';
'fTANK', 'fBANK', 'fENTRY', 'fRESULT'
now this maybe unconventional, but when I look back at code 3 or
4 years down the line I find it more informative than 'nGrav' or
'asTpX', even if those have been declared.
After all, when I see:
put vRESULT into fld "fRESULT"
it shouldn't be hard to work out what's going on.
------------------------------------------------------------------------------------------
Now, I agree with the various remarks about non-native speakers
who are coding in Revolution only insofar as they need to understand
some of the quasi-English terms; but I am not entirely sure how
Strict Compilation is going to help with that.
Surely what is needed is an IN-BUILT spell checker attached to the
Script Editor.
Mark Wieder wrote:
> Richmond-
>
> Saturday, May 9, 2009, 2:24:47 PM, you wrote:
>
>
>> Writing as someone who, generally, learns from his errors, and
>> trying to work out why they are error, this sounds as if it would
>> not be a great advantage to me.
>>
>
> Not to worry - there's plenty of errors to go around...
>
> ...I'd be happy to let you have some of mine...
>
>
More information about the use-livecode
mailing list