Revision: 1214
Author: sebastien.lelong
Date: Mon Aug 17 09:22:50 2009
Log: deprecate "var ... is ..."
http://code.google.com/p/jallib/source/detail?r=1214
Modified:
/wiki/JallibStyleGuide.wiki
=======================================
--- /wiki/JallibStyleGuide.wiki Sun Jul 26 02:57:09 2009
+++ /wiki/JallibStyleGuide.wiki Mon Aug 17 09:22:50 2009
@@ -163,8 +163,8 @@
Ex: how to use your library (doing amazing things with the GP2D02 IR
ranger)
{{{
-- declare in/out pins for the ranger
- var bit ranger_pin_in is pin_A0
- var bit ranger_pin_out is pin_A1
+ alias ranger_pin_in is pin_A0
+ alias ranger_pin_out is pin_A1
}}}
and make sure the pins work as required:
{{{
@@ -182,6 +182,8 @@
_Exception_: if your library uses a special PIC feature, it may use the
name defined in the device files / datasheet. Not so much an exception, as
you'll use the pin name given the context (feature, peripheral)
+_Note_: syntax "var ... is ..." is now deprecated in favor of "alias ...
is ..." and must not be used anymore. "alias" keyword is more powerful as
it allows to create synonyms for any type of names (variables, constants,
procedures, functions, psdeudo-variables)
+
Ex: a i2c hardware library (using built-in PIC i2c) may refer to `SCK` and
`SDA`. Those pin names are set into the device include file (prefixed with
the portname!).
== Let the user initialize the library ==
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---