× 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 have come across something that puzzles me about the new program model in
V6R1.

I created a test program using the new H spec keyword MAIN.

In this version I included a global variable and code in the MAIN procedure
that first display the value and then initialized it to 1.

When I called the first time is displayed 0 which is what I would expect but
I when I called it a second time is showed a value of 1 again.

In other words the value of the static variable was kept between calls.

I took another version with no MAIN and LR = *On and value was always 0.

Since you now longer have an *INLR in the new program model how does the
storage ever get released? Only the ending of the job?

Seems kind of strange. Shouldn't it always be 0 with the new program model
because the storage is released on each call?

Thanks.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.