Topic: Default i/o streams in 'Simply Fortran'

I've been trying out Simply Fortran on the 30 day trial - and have been impressed with it. There's just one little question I'd like to clarify. When I ran the simple tutorial example the message in the PRINT statement appeared in the console window as expected.

I then tried runs of my own code which has both PRINT and WRITE statements - when this code was run with another compiler the output from the PRINT statements still appeared on the console, but that from the WRITE statements appeared in an output file that is specified in an OPEN statement.  With the Simply Fortran complier all the output (from both PRINT and WRITE) goes to the output file.

The OPEN statement is OPEN(UNIT=6,....) so I'm guessing that 6 is the default output for PRINT in Simply Fortran (which to be fair is the historic default value from way back... - but I think it was 2 for the other complier). I presume that if I change the OPEN to something like OPEN(UNIT=12,...) I'll get back to getting PRINT output at the console and WRITE output in the file? I would have tested it myself but my evaluation period is up! I just wanted to be sure before parting with money....


PS If I get the individual user licence for Mac will I will be able to run the product on two different Macs in different locations - not at the same time of course.

Re: Default i/o streams in 'Simply Fortran'


Our compiler's standard input/output units are 5 and 6, and it's best to avoid reassigning them to a file.  In the past on Windows, the Fortran code would actually crash if attempted (that has been resolved, of course).  If you're using Print statements, they should always write to unit 6, which is what you've seen.

Generally speaking, for portability, it is best to avoid any unit number under 20.  Compilers often reserve the low units for specific reasons.  I normally suggest using 100 or above.

If you buy a single Individual License for macOS, you can absolutely use the same Registration Key on both systems.  Our license is tied to a name, not a particular machine.  However, I would suggest delaying any purchase until Monday or Tuesday.  We should have big news ready by then...

Jeff Armstrong
Approximatrix, LLC

Re: Default i/o streams in 'Simply Fortran'


Thats great, thanks for the clarification.

I will follow your intriguing advice about license purchase!