Some notes about ASA (or ANSI, or FORTRAN) carriage control as it regards to FORTRAN (still part of COBOL last I knew as well) …
Spacing often depends on type and kind being printed
program main
use,intrinsic :: iso_fortran_env, only : int8, int16, int32, int64
write(*,*) 10_int8, 20_int8, 30_int8
write(*,*) 40_int8, 50_int8, 60_int8
write(*,*) 10_int16, 20_int16, 30_int16
write(*,*) 40_int16, 50_int16, 60_int16
write(*,*) 10_int32, 20_int32, 30_int32
write(*,*) 40_int32, 50_int32, 60_int32
write(*,*) 10_int16, 20_int64, 30_int64
write(*,*) 40_int16, 50_int64, 60_int64
end program main
10 20 30
40 50 60
10 20 30
40 50 60
10 20 30
40 50 60
10 20 30
40 50 60
So it is usually (totally up to compiler) not just columns every 10 characters, it is because the default integer type needs that spacing to print from -(huge(0)) to huge(0).
Note the difference is primarily for creating neat columns; and so with several compilers the spacing depends on the type being printed, where the maximum required width for a type is the default. Several compilers use the same conventions (compact or column-aligned) for NAMELIST group output as well.
The G0 descriptor is very similiar to compact list-directed output
The G0 field (almost) lets you control it independent of the compiler, which has a lot of freedom in spacing, delimiters, and line length for list-directed I/O.
Some compilers still support the ANSI carriage control on stdout, including gfortran, as an option.
program main
character(len=*),parameter :: free='(*(g0,1x))'
print free, 10, 0.5, 1.0/3.0
end program main
10 0.500000000 0.333333343
with the caveat that complex values are printed as “(r,i)” in list-directed output, but as “r,i” using that format. So there is a relatively easy way to get the compact format in a portable fashion yourself, but the neat columns are harder to produce yourself generically with a format, so IMO the neat column format is a good default.
There is ASA carriage control support still out there
program main
character(len=*),parameter :: g='(*(g0,1x))'
!OPEN(unit=stdout,CARRIAGECONTROL='FORTRAN') ! cannot change
!OPEN(newunit=lun,file='/dev/tty',CARRIAGECONTROL='FORTRAN') ! does not work particularly well
OPEN(newunit=lun,file='test.asa',CARRIAGECONTROL='FORTRAN')
write(lun,g)'1new page'
write(lun,g)' stuff to print'
write(lun,g)' stuff to print'
write(lun,g)'+______________'
write(lun,g)' stuff to print'
end program main
gfortran main.f90 -o asa_test.exe -fdec
./asa_test.exe
I do not like the implementation much, as it is very quirky if mixed with list-directed I/O and cannot be used directly to the screen easily like the real DEC OpenVMS implementation and so on, but it is there.
I have a program that converts ASA files to Adobe PDF, and still get requests for it, albeit far less frequently than in the past, by the way. Since HTML really was not designed for page breaks, especially initially, some people are still looking for a really easy way to get a plain ASCII file that can be printed with page breaks at specified locations; particularly as less printers support control characters (let alone ASA carriage control, which at one time was ubiquitous).