27 lines
777 B
Text
27 lines
777 B
Text
CHARACTER Fnam = "\HicEst\Rosetta\Align columns.txt"
|
|
|
|
OPEN(FIle=Fnam, Format="12$", LENgth=rows)
|
|
! call the DLG function in MatrixExplorer mode:
|
|
DLG(Edit=Fnam, Format='12A10') ! left adjusted, 12 columns, 10 spaces each
|
|
|
|
! or the standard way:
|
|
CALL Align( "LLLLLLLLLLL ", Fnam, rows) ! left align
|
|
CALL Align( "CCCCCCCCCCC ", Fnam, rows) ! center align
|
|
CALL Align( "RRRRRRRRRRR ", Fnam, rows) ! right align
|
|
END
|
|
|
|
SUBROUTINE Align(picture, filename, rows)
|
|
CHARACTER picture, filename
|
|
CHARACTER out*400, txt*20
|
|
|
|
W = LEN(picture)
|
|
DO i = 1, rows
|
|
out = " "
|
|
DO j = 0, 100
|
|
txt = filename(i, j+1, *9) ! on error branch to label 9
|
|
WRITE(Text=out(j*W+1 : ), Format=picture) txt
|
|
ENDDO
|
|
9 CONTINUE
|
|
WRITE() out
|
|
ENDDO
|
|
END
|