Code Comments
Programming Forum and web based access to our favorite programming groups.Hello, A colleague had some code like: MODULE mydata PRIVATE REAL, PUBLIC, SAVE, DIMENSION(10)::emc DATA emc/1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0/ END MODULE mydata which compiled with no problems. When he USEd the module mydata in some othe r code and printed out the values of "emc" he always got zeroes. I never use DATA state ments anymore, so I changed the code to MODULE mydata PRIVATE REAL, PUBLIC, PARAMETER, DIMENSION(10)::emc = & (/1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0/) END MODULE mydata and, as expected, when he printed out the "emc" numbers they were now 1.0,2. 0,...10.0. My question is, why doesn't the first module make the emc numbers available? Oh, and both forms worked using the PGI compiler. Only the SGI f90 compiler gave zeroes f or the first form. Thanks, paulv
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.