From: Luka Djigas on
Simple question really; is there an option which disables command characters actions (1,0,+ or blank
in column 1) in either Intel's or gfortran's line of compilers ?

If I understood correctly, they're deleted out of f2003 (or have I misread ?).

pp, Luka
From: glen herrmannsfeldt on
Luka Djigas <ldigas@___gmail___.com> wrote:

> Simple question really; is there an option which disables
> command characters actions (1,0,+ or blank in column 1)
> in either Intel's or gfortran's line of compilers ?

What do you mean by 'disable'?

Most systems now do not do anything special with column 1,
such that it will print out on your screen. That is what
I would mean by disable. If you want to not perform any
action, and also not print out column 1, that is different.

> If I understood correctly, they're deleted out of f2003
> (or have I misread ?).

-- glen
From: Richard Maine on
Luka Djigas <ldigas@___gmail___.com> wrote:

> Simple question really; is there an option which disables command
> characters actions (1,0,+ or blank in column 1) in either Intel's or
> gfortran's line of compilers ?

Many modern compilers don't do anything about them in the first place.
They were more descriptions of how one class of printers worked than of
something that a compiler was particularly expected to do. Most printers
today don't work like that. (Some do, but most don't). Typically, if you
want the carriage control characters to work on most of today's
printers, you process the output with a sparate program (such as the asa
program).

I believe that's the case with gfortran. I suppose I could be wrong, but
I doubt there is a way to make gfortran do anything about carriage
control, so if you want it off, there is nothing to do.

Intel's compilers come from a line that historically processed standard
output to make it emulate asa printer behavior. I believe there is a way
to turn that processing off, but I don't know the details.

Note that it only applied to standard output. If you open any other
file, you shouldn't get carriage control interpretation unless you go
out of your way to ask for it (which might be possible).

> If I understood correctly, they're deleted out of f2003 (or have I misread ?).

Yes, they are gone. In a way, they were never in the standard. Yes,
there were words in the standard about it, but those words were pretty
much without substantive content. I will give my version below. These
are my words rather than the standard's, but I claim that they are
equivalent, if a bit more verbose and... um... informal. :-)

"Some printers might act like this. (Insert the details here). Others
might not. It doesn't hecessarily have anything to do with Fortran, as
the printers might act that way for files created by any language. We
just thought it might be useful to remind you of it in the Fortran
standard for some reason. Not that we are going to tell you comparable
things about any other output devices.

The Fortran standard doesn't specify what files, if any, this stuff will
happen to. Nor does it provide a way for you to control it, or even
inquire about it. Hope this is helpful.

Completely unrelated things might happen instead. Heck, the printer
might do something like interpret data sent to it as Postscript. But
this margin is too small to describe Postscript in, so we won't. Besides
which, Postscript didn't exist when we wrote the first version of this.

And all this stuff might have happened if we hadn't said anything about
it. If some future committee deletes all this from the standard, the
same things might continue to happen.

Don't ask me why we even bothered to mention this is the Fortran
standard in the first place. Maybe someone said they would vote 'no'
unless this was in. Seemed harmless enough as it has no effect."

--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain
From: Luka Djigas on
On Mon, 29 Mar 2010 22:44:28 +0000 (UTC), glen herrmannsfeldt <gah(a)ugcs.caltech.edu> wrote:

>Luka Djigas <ldigas@___gmail___.com> wrote:
>
>Most systems now do not do anything special with column 1,
>such that it will print out on your screen. That is what
>I would mean by disable. If you want to not perform any
>action, and also not print out column 1, that is different.

Yes.
For example,
!__________________
integer :: i=125
write(*,100)i
100 format(i3)
read(*,*)
end
!__________________

would give me a blank line (on intel's) and a "25" in the second.
On a printer, this would give me a blank page (I believe) and a "25" on
the next.

I was interested, was there a way to disable that behaviour, so that the above
program would just print out "125" in the first row ?

Kind regards,
Luka

p.s. Just in case you're wondering, there isn't any problem which this causes.
It's just that some of my friends were talking about some stuff the other day,
this topic came up ... so it reminded me of old behaviour (an old
matrix 9 dot I used to have) ... so I went playing with it a little on modern compilers
to see what would happen. One thing lead to another ...
From: Luka Djigas on
On Tue, 30 Mar 2010 01:32:37 +0200, Luka Djigas <ldigas@___gmail___.com> wrote:

>On Mon, 29 Mar 2010 22:44:28 +0000 (UTC), glen herrmannsfeldt <gah(a)ugcs.caltech.edu> wrote:
>
>!__________________
>integer :: i=125
>write(*,100)i
>100 format(i3)
>read(*,*)
>end
>!__________________
>
Mea culpa. I spoke too soon (and too fast).
On Intel's compiler, it indeed doesn't do anything ... prints out "125".
However, on MS Powerstation 4, it gives out "25" after a blank line.

A coleague run this snippet on his machine while we were discussing it on MSP4, so I (wrongly)
assumed Intel would do the same.


-- Luka