× 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.



Hi Barbara

Thank you. Yes I am guilty, I fell into a C pitfall. Also Paul warns
against this problem.

However I am not sure how I should code this.
I guess it should be
#define I03 2
which sets up array index 2 to look up the Indicator area.

Frank
On 2014-04-01 04:46, frank kolmann wrote:
I have coded my first C program.

One thing I noticed is that you have a numeric constant starting with zero.

#define I03 02

In C, when a numeric constant starts with zero, it's an octal constant (base 8). You're ok with 02 since it means 2 in both decimal and octal.

But if was a constant like 023, it would be 19 in octal (2*8 + 3)

Barbara Morris

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.