Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,3 @@
DIMENSION A(5,4,3,2) !Declares a (real) array A of four dimensions, storage permitting.
X = 3*A(2,I,1,K) !Extracts a certain element, multiplies its value by three, result to X.
A(1,2,3,4) = X + 1 !Places a value (the result of the expression X + 1) ... somewhere...

View file

@ -0,0 +1,14 @@
INTEGER A(3,3) !An array, regarded as being a matrix.
DATA A/1,2,3, !Some initial values.
2 4,5,6, !Laid out as if a matrix.
3 7,8,9/ !But supplied as consecutive elements.
WRITE (6,*) "Writing A..."
WRITE (6,1) A !Using the array order.
1 FORMAT (3I2) !After three values, start a new line.
WRITE (6,*) "Writing A(row,col) down rows and across columns..."
DO I = 1,3 !Write each row, one after the other.
WRITE (6,1) (A(I,J), J = 1,3) !The columns along a row.
END DO !Onto the next row.
END