- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For a bit of a giggle I've been writing a bit of a Fortran "parser" (whatever that is) in ... Fortran! Getting fixed source form to work has not been fun. Some pathological examples came to mind, which also cause ifort 12.0.4 some grief:
[fxfortran]C23456 C The following is a type-declaration-stmt for an array that is also C the first statement of a main program. It is not a function-stmt, C but the compiler could perhaps be forgiven for thinking so... INTEGER Elemental Function Name(10) C Body of program just for fun. ElementalFunctionName = [(i,i=1,SIZE(ElementalFunctionName))] PRINT "(10(I0,:,','))", ElementalFunctionName END [/fxfortran]
[plain]>ifort silly_var_name.for Intel Visual Fortran Compiler XE for applications running on IA-32, Version 12.0.4.196 Build 20110427 Copyright (C) 1985-2011 Intel Corporation. All rights reserved. silly_var_name.for(5): error #5082: Syntax error, found INTEGER_CONSTANT '10' when expecting one of: )INTEGER Elemental Function Name(10) --------------------------------------^ compilation aborted for silly_var_name.for (code 1)[/plain]
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Now I've seen everything - a Fortran parser in Fortran?!
Very amusing example - thanks. Escalated as DPD200170271.
Very amusing example - thanks. Escalated as DPD200170271.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>Now I've seen everything - a Fortran parser in Fortran?!
Circa 1980 there was acompany producing a word processor software package for the PDP-11 writtenin FORTRAN called MAS90 (I do not know if this is the same company with the currentaccounting package named MAS90). Writing a word processor in FORTRAN was rather weird.
Jim Dempsey
Circa 1980 there was acompany producing a word processor software package for the PDP-11 writtenin FORTRAN called MAS90 (I do not know if this is the same company with the currentaccounting package named MAS90). Writing a word processor in FORTRAN was rather weird.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
back in college days, we were using a breadboard computer kit in a class whose focus
was creating code to interface with hardware. Stuff like making music come out of a speaker or
setting up an led display. You were expected write assembly langauge code and convert it into
machine code by hand.
I had a DEC system 10 account for another class, so I wrote an assembler in Fortran, to convert
my code. About the only time I ever needed to use Z format.
was creating code to interface with hardware. Stuff like making music come out of a speaker or
setting up an led display. You were expected write assembly langauge code and convert it into
machine code by hand.
I had a DEC system 10 account for another class, so I wrote an assembler in Fortran, to convert
my code. About the only time I ever needed to use Z format.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, I've seen an OS written in Fortran (PRIMOS), but with lots of extensions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is not that silly. The Burroughs Algol lanaguage was written in Burroughs Algol. They had towrite the first generation which had only a few statements by hand but after that could use the compilergenerated to write the next bits. They found that the compiler generatedsmaller code than their initial hand written one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This has been fixed for a release later this year.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page