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


  • Subject: Re: Terminating a C program
  • From: rjd@xxxxxxxxxx
  • Date: Wed, 9 Aug 2000 21:37:44 -0500

On 08/09/2000 at 05:48:16 PM, "Simon Coulter" <shc@flybynight.com.au>
wrote:

     >3.  I looked up the ILE C Programmers Guide(appendixH) where it
>states.....keeping an activation group active after the program has exited
>means that all the storage associated with that program is still allocated
>and in a 'last-used' state. When the program is called again,
>initialization, as defined by the language, is not done. All variables
have
>the last value assigned to them in the previous run of he program. In
>addition all of the settings in the ILE C run-time are in 'last-used'
state
>such as signal(),strtok() etc......." .(reference H1.1).

Interesting, I would expect automatic storage to be reinitialised
regardless of
activation group persistence.


Simon, given all of the great information that you share with the mailing
list, I was surprised by your last statement (above).  Perhaps I
misunderstood.

The information cited from the Programmer's Guide applies only to static
data.  For C and C++, initialization of automatic storage is not defined by
the language, and, independent of the activation group, automatic storage
is never initialized (by the compiler or machine) for these languages.  It
would be very wrong, for example, to assume that automatic variables are
initialized to zero.

Bob Donovan
IBM Rochester


+---
| This is the C/400 Mailing List!
| To submit a new message, send your mail to C400-L@midrange.com.
| To subscribe to this list send email to C400-L-SUB@midrange.com.
| To unsubscribe from this list send email to C400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: bob@cstoneindy.com
+---

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.