Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Fortran > Re: local varia...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 10 Topic 8171 of 8774
Post > Topic >>

Re: local variable initilization

by Steve Lionel <Steve.Lionel@[EMAIL PROTECTED] > Apr 24, 2008 at 03:08 PM

On Thu, 24 Apr 2008 14:17:13 GMT, Dick Hendrickson
<dick.hendrickson@[EMAIL PROTECTED]
>
wrote:

>> On 4月24日, 上午11时37分, Mike <Sulfate...@[EMAIL PROTECTED]
> wrote:

>> the default for the values of all the local variables and arrays in a
>> procedure is "save" attribute, so it is better for you to give initial
>> values for
>> the local variables in the execute line.

>NO,NO,NO!  The default for all local variables (an array is a
>variable) is NOT save.  Unless you specifically do something,
>all variables start out undefined and become undefined when
>a procedure returns.  This is different from some other
>languages.

Dick is correct that, by the Fortran language, the default is not SAVE,
CVF,
however, applies such a default as an extension.  Intel Fortran, as it
happens, does not. (There is an option /Qsave).

As suggested earlier, /recursive will disable the assumed SAVE semantics
(except for initialized variables).
--
Steve Lionel
Developer Products Division
Intel Cor****ation
Nashua, NH

For email address, replace "invalid" with "com"

User communities for Intel Software Development Products
  http://softwareforums.intel.com/
Intel Fortran Sup****t
  http://sup****t.intel.com/sup****t/performancetools/fortran
My Fortran blog
  http://www.intel.com/software/drfortran
 




 10 Posts in Topic:
local variable initilization
Mike <SulfateIon@[EMAI  2008-04-23 20:37:45 
Re: local variable initilization
"jamesgiles@[EMAIL P  2008-04-23 20:56:08 
Re: local variable initilization
"James Van Buskirk&q  2008-04-23 22:56:59 
Re: local variable initilization
Herman D. Knoble <Skip  2008-04-24 07:29:19 
Re: local variable initilization
blitheli <blitheli@[EM  2008-04-24 06:06:32 
Re: local variable initilization
Dick Hendrickson <dick  2008-04-24 14:17:13 
Re: local variable initilization
"James Van Buskirk&q  2008-04-24 11:39:33 
Re: local variable initilization
Steve Lionel <Steve.Li  2008-04-24 15:08:36 
Re: local variable initilization
=?GB2312?B?SmFuIFZvcmJyqL  2008-04-25 16:42:21 
Re: local variable initilization
Mike <SulfateIon@[EMAI  2008-04-24 21:27:25 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 23:36:18 CDT 2008.