Greetings Joep, On May 30, 4:57 am, Joep Suijs <[email protected]> wrote: > > I gave this some thought. String is mostly used to print constants. In > the less-common cases where it is used for printing a variable string, > it is likely that the var string itself is longer than the text to be > printed. Hence, early termination on a 0 (or 255) is logical most > cases so it should be the default behavior. > However, I do see your point of providing the dump function, > regardless of the content. > So what about changing the behaviour to terminate on 0, optionally on > an other char and optionally, disable this behavior? >
Let me see if I can re-state the current behavior: case 1: print_string_terminator is not defined: the code simply loops thru the string based whatever 'count(str)' returns. case 2: print_string_terminator is defined: then the code checks and will terminate early if the 'terminator' is seen. This is great, since as you say above, mostly this routine is used for printing constants. Furthermore, in the less-common case, all you have to do is to define the terminator and the code works fine. So, my preference - leave the code alone. Especially since we know it triggers buggy code in the most recent 'released' (not beta) compiler: 2.4m. William -- 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.
