Hi,
> Okay, I understand.
> I think it is a real but rare requirement. We could handle this in
> different ways:
>
> 1- As you describe: format puts the output in a buffer and a user
> always calls a function to output this buffer to a device. This means
> most user have to make two calls.
> (2- To make the output-call optional included with the format call.
> This means most users will save a call, but all users must specify a
> (dummy) device.)
> 3- To always call the output function. When you don't want the output,
> pass a dummy var. Also, documenten how to access the formatted string.
>
> When I wrote the three options above, I realised that the 2nd one is
> not add much to the third one - it only saves a few bytes of program
> memory.
>
> I'd like to hear what option people on this list prefer...
>
I'm sorry I didn't understand the example with 7 segments... I don't
understand why you want to change current behavior. Though I admit "format"
and "print" are confusing for me (format also prints).
Ideally "format" should formats and return a structure representing that
format, which could be then used by "print". That way you refactor the
formatting code in "format", and use these functions in "print". That might
be overkill and costs a lot though ("pragma inline" to the rescue... but
this structure -- array ? -- could cost a lot).
In any cases, try not to blow up current API :)
Cheers,
Seb
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---