From: Steve Lionel on 11 Jun 2010 16:41 On 6/11/2010 4:10 PM, rfengineer55 wrote: > Is this error message that I got, variable not assigned to a label, > assigned to pop up with any other constructs? What does the error > message actually mean? I explained this in my earlier post. You will get that message when you have an variable name in a context where a label is required (format, GO TO, etc.) but no ASSIGN statement was seen naming that variable. ASSIGNed GOTO is an obsolete language feature. The apostrophe form for the record specifier is documented in section 7.1.1.6 of the VAX Fortran Language Reference Manual (at least the copy I have), along with REC=. I am not sure why you changed this, since Intel Fortran accepts it. Yes, making guesses as to what to fix is probably not a good idea if you don't understand the problem. -- Steve Lionel Developer Products Division Intel Corporation Nashua, NH For email address, replace "invalid" with "com" User communities for Intel Software Development Products http://software.intel.com/en-us/forums/ Intel Software Development Products Support http://software.intel.com/sites/support/ My Fortran blog http://www.intel.com/software/drfortran
From: glen herrmannsfeldt on 11 Jun 2010 17:00 rfengineer55 <rfengineer55(a)aol.com> wrote: (snip) > Uh-oh, I'm my own worst enemy. I did in fact, replace the apostrophe > with a comma. > So it looks like I caused my own error then? I will try your > alternative form. Steve at Intel suggested the same thing. I looked > in my VAX Fortran book and could not find that aopostrophe construct > and obviously wrongfully concluded that it (the apostrophe) should not > be there. > Is this error message that I got, variable not assigned to a label, > assigned to pop up with any other constructs? What does the error > message actually mean? Back to Fortran I there is ASSIGNed GOTO. You can say: ASSIGN 123 to I and then later: GOTO I,(123,456,789) where the list is the possible GOTO targets. Some compilers allow GOTO I (without the list). Fortran 77 added the ability to use ASSIGN with FORMAT statements, such as: ASSIGN 234 TO I WRITE(6,I) 234 FORMAT(' HI THERE!') An interesting, though not so needed, feature, it was then removed in Fortran 90. I do wonder if it ever got used in any production (as opposed to tests like above) programs. The Fortran 66 style variable format requires an array, so it won't be confused with the assigned format above. INTEGER F(5) DATA F/'('' H','I TH','ERE!','')'/ WRITE(6,F) (Using Fortran 77 style character constants instead of Hollerith.) -- glen
From: glen herrmannsfeldt on 11 Jun 2010 17:07 rfengineer55 <rfengineer55(a)aol.com> wrote: (snip, I wrote) >> The IBM form of unformatted direct access I/O looks like: >> >> � � � WRITE ( UNFDAT'IREC ) FREQ, SIG(II), >> � � �+D1( JJ ), UMVM(II,JJ), D2( JJ ), BMVM(II,JJ) (snip) > Uh-oh, I'm my own worst enemy. I did in fact, replace the apostrophe > with a comma. > > So it looks like I caused my own error then? I will try your > alternative form. Steve at Intel suggested the same thing. I looked > in my VAX Fortran book and could not find that aopostrophe construct > and obviously wrongfully concluded that it (the apostrophe) should not > be there. In the VAX Fortran manual AA-D034E-TE from bitsavers, it is in section 7.1.1.6, but it would be very easy to miss. They indicate the two forms of record specifier as: REC=r 'r There is an example of a READ in section 7.2.2.2, but you would likely look there when you knew you were doing direct access read. I don't see an example of direct access write, but by symmetry... -- glen
From: glen herrmannsfeldt on 11 Jun 2010 17:12 Steve Lionel <steve.lionel(a)intel.invalid> wrote: (snip) > I explained this in my earlier post. You will get that message when you > have an variable name in a context where a label is required (format, GO > TO, etc.) but no ASSIGN statement was seen naming that variable. > ASSIGNed GOTO is an obsolete language feature. I wonder if the message should be changed. Accidentally putting an INTEGER variable into a READ or WRITE statement is probably more likely than actually using ASSIGNed FORMAT and forgetting the ASSIGN. (Especially if there are no ASSIGN statements in the whole program.) I do remember early in my Fortran days (and before 1977) trying to use an ordinary INTEGER variable, to see if it would work. I=123 WRITE(6,I) 123 FORMAT(' hi there!') before I understood what compilation did. That might have been my first understanding of the idea that statement labels don't go into the object program. -- glen
From: glen herrmannsfeldt on 11 Jun 2010 17:22
rfengineer55 <rfengineer55(a)aol.com> wrote: (snip) > You of course are responsible for your interpretation. The poster did > not say anything that was offensive, you are quite right. His > mentioning that i'm ranting, flailing, etc., is simply useless > information. What is the useful purpose of such comments then? From > my perspective, it is a waste of time. So your words are not at all > helpful. After a while you get used to how different people respond. There is someone who posts to another group that I read that often uses the term 'stupident' in replies. Some might take it personally, but after a while you find that he treats everyone about the same. Also, most often he does know what he is talking about, technically. (If you google for stupident and newsgroup it probably won't take too long to find.) Somewhere I have seen a recommendation that people read a newsgroup for six months before writing their first post. It seems likely that the fraction that actually follow that is near zero, but it would give you time to understand the different types of answers you get from different people, and what you should and should not take personally. -- glen |