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



Bartell, Aaron L. (TC) wrote:

>>If you don't initialize a "varying" field, I think it's length is set to
> zero so the error makes since.
> Actually it is just blank space - x'40' until I Inz it, then it is x'F0'.
> 
> It would be nice if it would initialize to zero for you or have the
> compiler
> notify you that it was not initialized.  For example the Java compiler
> gives the following message for the following code:
> 
> int count;
> for (int i = 0; count > i; i++){
>    System.out.println("Hi");
> }
> 
> Compile error: variable count may not have been initialized.

This is consistent with behavior you've experienced before with 
uninitialized decimal numeric subfields. As already noted, by default, a 
data structure is initialized to all blanks, hex 40's. If you want 
subfields initialized to something other than hex 40's, code the INZ 
keyword either on the DS definition, or on the subfield definition.

Can we change the compiler to give an error message? Sure, it's doable. But 
when you get a successful compile, do you ever bother to look at the 
compile listing and check the severity 10 diags?

Cheers! Hans


As an Amazon Associate we earn from qualifying purchases.

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