Hi Seb,

[RobH]
>> When I saw the first time setup() being called by the library itself it
>> was sort of a shock to me.


[Seb]
> You just want to build a protoyping board to test two LCD type. A switch 
> allow 
> to test either one LCD or the other. The PIC reads the switch state before 
> actually setup one LCD or the other. So, I need to choose which setup() to 
> run, to manually have control on it.
> 
> How to do this when setup() is called automatically at include time ? Again, 
> such a constraint is not worth. I vote for flexibility: let the user call the 
> setup().

I see your point, and I agree. If I had never seen xxx_setup() being 
called 'during' include I would never had thought of doing it otherwise 
than calling it explicitly from my own code at the time I start using 
the library functions.

But even when xxx_setup() is called by the library itself I can call it 
as many times as I like in my program, with the same or different setup 
parameters. When it is properly documented it will not be difficult to 
know the state of the PIC after any call of xxx_setup().

The advantage of letting xxx_setup() called by the library is that the 
user may/can forget it, but maybe that is making lazy programmers even 
lazier...

For consistency we should chose for one or the other method. Then I vote 
for xxx_setup() being called by the user program.

Regards, Rob.

PS: It is surprising how many aspects of a software library I did _not_ 
foresee by joining the Jallib team, even though I have worked in other 
programming groups (maybe I simply forgot, it was some time ago)!


-- 
Rob Hamerling, Vianen, NL (http://www.robh.nl/)

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to