Topic: Ascii control characters

Can the ascii control characters like FF LF CR BELL etc work on a windows system or will it only work on the old tty monitors  ?

Is there anything similar for Windows systems ?


Imre

Re: Ascii control characters

Simple ASCII control characters should still work on Windows terminals, although BELL probably won't (most systems block that by default).

Jeff Armstrong
Approximatrix, LLC

Re: Ascii control characters

Hummm ... ok ... I tried it a couple of times but I could not get it too work ... I will try again. The following did not work ???

integer cr,lf
data cr/o"015" lf/"012"/

....

write (*,5) cr,cr,lf,lf
5 format (4a1)


Thanks, Imre

Re: Ascii control characters

try

write(*,"(2a)")char(13),char(10)

Re: Ascii control characters

Hi Baf1, thanks for the suggestion but it did not work. I tried 7 different ascii codes, the only one that worked was LF ... not too exciting because a / in the format stmnt will do the same thing.


Imre

Re: Ascii control characters

Not sure what you expect to happen when you display a control characters on screen?  The windows console may not react the same as a typical ANSI terminal did in the "old days".  However, both control M and control L give me the expected behavior.

Try the following program

program testcc
  implicit none
  integer::i
  do i=1,18
    write(*,"(i2,2x,a)")i,char(i)
  end do
end program testcc