× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I wonder if it's because %BitAnd is looking at the character value of the
first byte of the bit map? If that was the case, it would be examining F7,
and of course the first bit would be '1'. Can anyone confirm/deny?

On Mon, Jun 22, 2009 at 9:39 AM, Michael Ryan <michaelrtr@xxxxxxxxx> wrote:

Man...I would have thought this would have been caught before...I must be
doing something wrong.


On Mon, Jun 22, 2009 at 9:35 AM, <J.Beckeringh@xxxxxxxxxxxxxxxxxxxxxxxxxx>wrote:

OK, I see what you mean. I get the same result (V6R1):

When I put the substring in a 1A field %bitand results in x'00010000'.

When I put the field in a datastructure and overlay it with a 3U 0 field,
it still goes wrong when I do the %bitand on the character field, but
%bitand on the integer correctly gives x'00000000'.

Looks like a bug to me.

Joep Beckeringh

rpg400-l-bounces@xxxxxxxxxxxx wrote on 22-06-2009 14:55:34:

Michael Ryan

Argh....I said that wrong. I'm comparing the result of the %BitAnd
(which I
would think would be x'00000000') to x'10000000', so I would expect that
comparison to be false, and follow the 'no' path. But it doesn't...it
follows the 'yes' path.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.