Parse Error Unexpected End Of Statement Fortran
Contents |
Today's Posts Advanced Search Find the answer to your Linux question: Entire Site Articles Downloads Forums Linux Hosting Forum GNU Linux Zone Programming / Scripting fortran problems If this is your first visit, be sure to check out the FAQ by clicking
Syntax Error In Data Declaration At 1 Fortran
the link above. You may have to register before you can post: click the register link unterminated character constant above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. ** If you are logged syntax error in argument list fortran in, most ads will not be displayed. ** Linuxforums now supports the Tapatalk app for your mobile device. Page 2 of 3 First 1 2 3 Last Jump to page: Results 11 to 20 of 28 Thread: fortran problems Thread
Fortran Unterminated Character Constant
Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Enjoy an ad free experience by logging in. Not a member yet? Register. 07-01-2010 #11 drl View Profile View Forum Posts Private Message View Articles Linux Engineer Join Date Apr 2006 Location Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris Posts 1,381 Hi. The PDF may be useful, but is difficult to read. It
Unclassifiable Statement At (1)
looks like it was scanned a long, long time ago. The Fortran code is written in the style of Fortran-66 for CDC computers - verified by a comment on page 11, although they called it Fortran IV, which, these days, is a very, very, very old dialect. If there are no tests and results with which to compare them, I would be very careful about using this code. There may be some in the PDF, I didn't read much farther so far into the PDF. More later ... cheers, drl Welcome - get the most out of the forum by reading forum basics and guidelines: click here. 90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia. We look forward to helping you with the challenge of the other 10%. ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP ) Reply With Quote 07-01-2010 #12 drl View Profile View Forum Posts Private Message View Articles Linux Engineer Join Date Apr 2006 Location Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris Posts 1,381 Hi. I have looked over the code briefly. The missing routines are probably subroutines to control the "CalComp" plotters. These were pen-and-ink plotters commonly found at CDC sites. These days, a quicker method to get plots is to write the calculated data to a file and use a
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of Conduct Ubuntu Wiki Community Wiki unexpected data declaration statement at (1) Other Support Launchpad Answers Ubuntu IRC Support AskUbuntu Official Documentation User Documentation Social
Fortran Line Continuation
Media Facebook Twitter Useful Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! Ubuntu Ubuntu Insights Planet gfortran Ubuntu Activity Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Packaging and Compiling Programs simple fortran program compile problem Having http://www.linuxforums.org/forum/programming-scripting/164315-fortran-problems-2.html an Issue With Posting ? Do you want to help us debug the posting issues ? < is the place to report it, thanks ! Results 1 to 7 of 7 Thread: simple fortran program compile problem Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode July 8th, 2008 #1 https://ubuntuforums.org/showthread.php?t=853105 dog6 View Profile View Forum Posts Private Message First Cup of Ubuntu Join Date Jul 2008 Beans 9 simple fortran program compile problem I am a first time programmer and have had difficulties getting this simple program to compile, any questions...? -------------------------------------------------------------------------------- This is the program I was using in pico and saved as hello_world.f GNU nano 2.0.7 File:hello_world.f Program Hello_World implicit none Print *, "Hello, world!" End Program Hello_World *** The text below is what happened when I tried to compile... any suggestions..? jerome@jerome-laptop:~$ gfortran -c hello_world.f hello_world.f:1.1: Program Hello_World 1 Error: Non-numeric character in statement label at (1) hello_world.f:1.1: Program Hello_World 1 Error: Unclassifiable statement at (1) hello_world.f:4.1: End Program Hello_World 1 Error: Non-numeric character in statement label at (1) hello_world.f:4.1: End Program Hello_World 1 Error: Unclassifiable statement at (1) Error: Unexpected end of file in 'hello_world.f' Adv Reply July 8th, 2008 #2 WW View Profile View Forum Posts Private Message Iced Blended Vanilla Crème Ubuntu Join Date Oct 2004 Beans 1,532 Re: simple fortran program compile problem Change the name of your file to hello_world.f90. See the section "Controlli
and examples. A table of sample statements appears in AppendixB. ACCEPT The ACCEPT statement reads from standard input. Syntax ACCEPT f [, iolist ] ACCEPT grname f Format identifier iolist List of variables, substrings, arrays, and http://web.utk.edu/~prdaves/Computerhelp/Fortran_Reference/fortran_statements.htm records grname Name of the namelist group Description ACCEPT f [,iolist] is equivalent to http://www.dsm.fordham.edu/ftnchek/html/lbAJ.html READ f [,iolist] and is for compatibility with older versions of FORTRAN. An example of list-directed input:
REAL VECTOR(10) ACCEPT *, NODE, VECTOR ASSIGN The ASSIGN statement assigns a statement label to a variable. Syntax ASSIGN s TO i s Statement label i Integer variable Description The label s is the label of an executable statement syntax error or a FORMAT statement. The statement label must be the label of a statement that is defined in the same program unit as the ASSIGN statement. The integer variable i, once assigned a statement label, can be reassigned the same statement label, a different label, or an integer. Once a variable is defined as a statement label, you can reference in: An assigned GO TO statement An input/output statement, as a format identifier syntax error in Restrictions Define a variable with a statement label before you reference it as a label. i must be INTEGER*4 or INTEGER*8, not INTEGER*2. While i is defined with a statement label value, do no arithmetic with i. Examples Example 1: Assign the statement number of an executable statement: ASSIGN 9 TO K GO TO K ... 9 WRITE (*,*) 'Assigned ', K, ' to K' In the above example, the output shows the address, not 9. Example 2: Assign the statement number of a format statement: INTEGER PHORMAT 2 FORMAT ( A80 ) ASSIGN 2 TO PHORMAT ... WRITE ( *, PHORMAT ) 'Assigned a FORMAT statement no.' Assignment The assignment statement assigns a value to a variable, substring, array element, record, or record field. Syntax v = e e Expression giving the value to be assigned v Variable, substring, array element, record, or record field Description The value can be a constant or the result of an expression. The kinds of assignment statements: are arithmetic, logical, character, and record assignments. Arithmetic Assignment v is of numeric type and is the name of a variable, array element, or record field. e is an arithmetic expression, a character constant, or a logical expression. Assigning logicals to numerics is nonstandard, and may not be portable; the resultant dcarelessness. Most of these messages can be turned off by command-line options. Which option controls each message depends on the nature of the condition being warned about. See the descriptions of the command-line flags in the previous sections, and of individual messages below. Each message is prefixed with a word or phrase indicating the nature of the condition and its severity. ``Error'' means a syntax error. The simplest kind of syntax errors are typographical errors, for example unbalanced parentheses or misspelling of a keyword. This type of error is caught by the parser and appears with the description ``parse error'' or ``syntax error'' (depending on the version of the parser generator and whether it is GNU bison or UNIX yacc). This type of error message cannot be suppressed. Be aware that this type of error often means that ftnchek has not properly interpreted the statement where the error occurs, so that its subsequent checking operations will be compromised. You should eliminate all syntax errors before proceeding to interpret the other messages ftnchek gives. ``Warning: Nonstandard syntax'' indicates an extension to Fortran that ftnchek supports but that is not according to the Fortran 77 Standard. The extensions that ftnchek accepts are described in the section on Extensions below. One example is the DO ... ENDDO construction. If a program uses these extensions, warnings will be given according to specifications under the -f77 setting. The default behavior is to give no warnings. ``Warning'' in other cases means a condition that is suspicious but that may or may not be a programming error. Frequently these conditions are legal under the standard. Some are illegal but do not fall under the heading of syntax errors. Usage errors are one example. These refer to the possibility that a variable may be used before it has been assigned a value (generally an error), or that a variable is declared but never used (harmless but may indicate carelessness). The amount of checking for usage errors is controlled by the -usage flag, which specifies the maximum amount of checking by default. Truncation warnings cover situations in which accuracy may be lost unintentionally, for example when a double precision value is assigned to a real variable. These warnings are controlled by the -truncation setting, which is on by default. ``Nonportable usage'' warns about some feature that may not be accepted by some