Weird behavior of a TRIML instruction

"James H H Lampert" <[email protected]>
Newsgroups gmane.comp.lang.as400.mi
Message-ID <[email protected]>
Fellow MI geeks:

I've finally tracked down the source of a weird bug that 
I'd thought involved either funky behavior of JDE files, 
or funky behavior of CPYBOLA.

In fact, it's TRIML that's acting strangely.

Would anybody have any idea why

TRIML FOO, BAR, ' ';

where BAR is CHAR(475) and FOO is BIN(4,0), and BAR 
contains 5 EBCDIC digit characters followed by 470 blank 
spaces,

would return 475, instead of just 5?

This is perplexing.

--
JHHL
_______________________________________________
This is the MI Programming on the AS400 / iSeries (MI400) mailing list
To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected]
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/mi400
or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected]
Before posting, please take a moment to review the archives
at http://archive.midrange.com/mi400.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.