Hi Matt,
On 04/06/2015 09:52 PM, Matthew Schinkel wrote:
I don't think this is causing problems with many of our programs,
however after my discussion with Kyle on Jallist, it seems we should
not use "_" as the first character for any identifiers. My usb_msd.jal
library does not work because of this, even though I did not use
variables starting with "_temp".
Per Kyle's suggestion, it seems we should go through all our libs to
rename variables. To keep it simple, I suggest moving all underscore
at the beginning of variable names to the end of the variable name, or
rename the variable all together if you wish.
I've seen the suggestion of Kyle, but it came to me as a 1 April joke!
And even if Kyle is serious we must not overreact.
I know that the compiler requires some specific variables with names
starting with an underscore be declared in the device files (e.g.
_pic_accum, _ind, etc.), but I always understood that the only reason
for the leading underscore is to avoid conflicts/duplicates with
'normal' variables. I can hardly believe that the compiler treats names
starting with an underscore differently than other names, at least I do
not see a reason (but that may be because I know next to nothing about
the internals of the compiler). And when this is true I would consider
this as a compiler (design) issue.
Our Jallib style guide suggests to use the underscore character.
"Names of other global entities (not supposed being used by
application programs) should use this prefix and use an additional
underscore at the beginning."
https://code.google.com/p/jallib/wiki/JallibStyleGuide
Yes, that has always worked so far, no complaints.
Rob, do you think we need to update all device files?
The device files, especially of the midrange, contain many names
starting with an underscore (like for the port shadowing code). When the
leading underscores must really disappear completely then of course also
these files must be changed. I expect that the change itself will not
be complicated, but testing might become time consuming....
Regards, Rob.
--
*Rob H*amerling - http://www.robh.nl
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/jallib.
For more options, visit https://groups.google.com/d/optout.