# Category : Miscellaneous Language Source Code

Archive : FORTRN77.ZIP

Filename : MAELEM.FOR

C

C THIS SUBROUTINE IS USED TO DO SOME MATRIX ELEMENTARY

C OPERATIONS ON ROWS OR COLUMNS.

C

DIMENSION A(1)

GO TO (1,2,3,7,8,9), IFLAG

C ROW OPERATION

C MULTIPLY A ROW BY A CONSTANT

1 IR = I

DO 4 II = 1,NCOL

A(IR) = SCALAR*A(IR)

4 IR = IR + LRA

RETURN

C SWITCH TWO ROWS

2 IR = I

IS = J

DO 5 II = 1,NCOL

C = A(IR)

A(IR) = A(IS)

A(IS) = C

IR = IR + LRA

5 IS = IS + LRA

RETURN

C ADD MULTIPLE OF ONE ROW TO ANOTHER

3 IR = I

IS = J

DO 6 II = 1,NCOL

A(IR) = A(IR) + SCALAR*A(IS)

IR = IR + LRA

6 IS = IS + LRA

RETURN

C COLUMN OPERATION

7 IR = LRA*(I - 1) + 1

DO 10 II = 1,NROW

A(IR) = A(IR)*SCALAR

10 IR = IR + 1

RETURN

8 IR = LRA*(I - 1) + 1

IS = LRA*(J - 1) + 1

DO 11 II = 1,NROW

C = A(IR)

A(IR) = A(IS)

A(IS) = C

IR = IR + 1

11 IS = IS + 1

RETURN

9 IR = LRA*(I-1) + 1

IS = LRA*(J-1) + 1

DO 12 II = 1,NROW

A(IR) = SCALAR*A(IS) + A(IR)

IR = IR + 1

12 IS = IS + 1

RETURN

END

Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/