Hi Vasile, all,

I have not used format.jal in a long time, but iirc, there is no clear
indication (eg '#' signs) if it fails to fit the output in the space
available, but some (the last?) chars get a strange value. Can you
confirm this and is this something that should be changed too?
Changing this would require a two-pass handling - first determine the
number of digits, next, generate the output. This will be a bit longer
and slower code, but would also (one day) enable the use of floating
point *representation* of a fixed point variable.

Joep

2010/6/14 Joep Suijs <[email protected]>:
> Hi Vasile,
>
>> Print procedures with variable length (3 or 5 digits) are not formated with
>> leader.
> This is by design. Print functions only output the optional sign and
> (hex) digits. In other words: straight forward and minimal number of
> chars. Personally, I value the simple interface too.
>
>> Once the procedure is used with LCD for example, where the LCD
>> position of the first digit is fixed by program, when jumps from 3 to
>> 2 digit, it change the digit position, changing also the meaning of the
>> displayed value.
> I agree, print is very useful for serial comms, but does not support
> the thight formatting you want for LCDs.
>
>> I know this is fixed somehow in format library, but...the format procedures
>> have more parameters to write
>> (and some weak beahaviour like printing an sword of 5 chars from which 1 is
>> after the decimal point and if
>> the first one is never used is still allocate as a blank on the LCD).
> True again. Format.jal should support strict formatting in a
> consistent way (where I'd suggest you specify the total nr of chars,
> regardless of the way they are formatted) and also support fixed
> point.
>
> The oldest open issue (oct 2008) addresses this. I think it would be
> very valuable to have such a libary for the people who use LCD's
> frequently, but am also aware it takes quite some effort to create
> (fix) such a library and so far, nobody actually put in this effort.
>
>> Maybe merging the old jprint procedures from jal04 with V2 print library
>> will be a good ideea.
>
> IMO we should either 'fix' format.jal (but this will create
> incompatibility) or create a new library and depricate format.jal. I
> don't think it is wise to create an other print/format library that
> (in time) does not provide alternatieve for all format.jal
> functionality. I'm not sure in which extend jprint helps, but I guess
> that's up to the one who takes this job on ;)
>
> Joep
>

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