Joep, we'll go with your example unless someone else wants otherwise.

Bit array is not supported. Anyways, it will be stored in program
memory which we seem to not worry about so much.

Matt.

On Sep 8, 1:33 am, Joep Suijs <[email protected]> wrote:
> Hi Matt,
>
> > there is also another option.
>
> > const DEBUG_ENABLE = TRUE
>
> > if DEBUG_ENABLE == TRUE then
> >   alias debug_1_byte_dec is print_byte_dec
> > else
> >   procedure debug_1_byte_dec(byte out device, byte in data) is
> >      pragma inline
> >   end procedure
> > end if
>
> I estimate there are about 15 procedures in print.jal. If I understand
> correct, you need 15 * 8 stubs if you want 8 groups of debug
> satements. If the group is a parameter, you only need 15.
>
> Btw, in my previous sample I used a bit array and they are not
> supported, are they? So maybe use a word to store the flags and also
> use a word to select the group and test with AND. This way debug
> statements can also put in multiple groups.
>
> > I'm not sure if this will actually use any extra bytes of data or
> > processing power, I can test it. I guess I actually need a "pragma
> > ignore" to ignore the entire procedure.
>
> I am not sure either, so testing is the way to go. It would be realy
> nice if most of the debug resources could be added / freed with one
> constant!
>
> > The advantage in my example is that the debug library will have
> > exactly the same API as print.
>
> True, but I don't see what is the benefit. I do think it is important
> to have the same modification for all 15 procedure names, so if know
> one or two, you know them all. No parameter swapping, no change of
> name (like dec -> decimal) etc.
>
> > I don't care either way. What does everyone prefer??
>
> I gave my view and also would like to hear from others!
>
> 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