×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.





On 15-May-09, at 7:53 PM, rpg400-l-request@xxxxxxxxxxxx wrote:

Interesting thing to me is why the compiler even allows it. It should throw
it out as an error because you are comparing an alpha field to a zero (A
numeric field).

Not so. The compiler will - and should - allow it.

*Zeros is _not_ a numeric - it is a figurative constant. By definition that takes on the data type of the field against which it is used - in this case a character field. So in this case *Zeros is a string of character zeros.

Had the comparison been against a numeric zero e.g If charField > 0; then the compiler would have correctly diagnosed it as an error.

Jon Paris

www.Partner400.com
www.SystemiDeveloper.com



This thread ...


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

This mailing list archive is Copyright 1997-2026 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.