Thanks for the input. This list really is a treasure.

Yes, it doesn't feel very safe that a character that the compiler doesn't
like isn't caught as an error at compile time. And that it in this case
meant that the statement always was evaluated to true must mean that "!="
with my CCSID (source file has 273 and target CCSID on the CRTCPPMOD was
*SOURCE) is interpreted as "==", which is kind of the last thing you want...
Confusing. Seems like I have more homework to do on the CCSIDs of source
files. I don't want to use trigraphs again. Yuck.

Regards,
Erik

2009/10/4 Genyphyr Novak <genyphyr1@xxxxxxxxx>

Hi Erik,

Yes probably so. The only other thing I can suggest is I have had very odd
problems happen on new release recompiles of code that previously 'worked
just fine' when there is a memory handling error somewhere (anywhere) in the
program. The error could in fact be in a totally unrelated part of the code.

On the old release when it compiled, you may have gotten 'lucky' and the
spaces that were allocated to the variables where there was a memory overrun
just never overlapped, and on the new release when it compiles, there is
memory stepped on somewhere, causing a bizarre error which seems to defy
logic. But I have to say the fact that with equals or not equals being
evaluated the same way, it is suspicious as an operating system issue. On
the other hand, there is nothing very special about that if statement so I
would do a serious analysis of the handling of memory everywhere.

Take care,

Genyphyr Novak



----- Original Message ----
From: "c400-l-request@xxxxxxxxxxxx" <c400-l-request@xxxxxxxxxxxx>
To: c400-l@xxxxxxxxxxxx
Sent: Sat, October 3, 2009 7:00:08 PM
Subject: C400-L Digest, Vol 7, Issue 50

Note: Forwarded message is attached.

Send C400-L mailing list submissions to
c400-l@xxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.midrange.com/mailman/listinfo/c400-l
or, via email, send a message with subject or body 'help' to
c400-l-request@xxxxxxxxxxxx

You can reach the person managing the list at
c400-l-owner@xxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of C400-L digest..."
Today's Topics:

1. 6.1 issue (Erik Olsson)
After being unable to get a successful compile on a 6.1 machine due to
ccsid
issues I used trigraphs for curly braces etc. The compilation then went
fine, but...

I have the following code.

fb = _Rreadf(fp, &buf, sizeof(buf), __NO_LOCK);
if (fb->num_bytes != sizeof(buf))
??<
cout << "That did not work" << endl;
_Rclose(fp);
return -1;
??>

The bizarre thing is that the if statement always evaluates to true (even
if
the read finds a record, and even if i change the comparison to "==". That
truly defies the rules of logic).
Other if statements in the same program work as expected. It's created with
CRTBNDCPP.
I have tried the program successfully on a V5R4 machine.

Guess it's time to check this with IBM?

Thanks,
Erik

This is the C programming iSeries / AS400 (C400-L) digest list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.
--
This is the C programming iSeries / AS400 (C400-L) mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.



This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2019 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 here. If you have questions about this, please contact [javascript protected email address].