Page 1 of 1

printing numbers with notappl

Posted: September 26th, 2019, 2:14 pm
by AriSilva
Up to version 7.1 or 7.2, I do no t remember, when you had a maketext with a variable whose value was notappl it was shown as "", that is, a blank value.
That was very handy because if you did not want to "polute" your output with zeros, it was just a matter of changing the variable from zero to notappl.
But now the variables with a notappl value are shown as "NOTAPPL".
You can see the difference by looking at these two files I´ve attached.

The question is: with this new version, is there a way to show a null string (or a blank) when the value is notappl?

Re: printing numbers with notappl

Posted: September 26th, 2019, 2:29 pm
by josh
How about a function like this:

function string notapplToBlank(numeric n)
if n = notappl then
notapplToBlank = "";
else
notapplToBlank = maketext("%d", n);
end;

Re: printing numbers with notappl

Posted: September 26th, 2019, 2:48 pm
by AriSilva
That´s what I´m doing write now, but it has to be done in a 1 by 1 basis, which is a pain in ...