Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

CallDeclareDimensionFunctionSubroutine

Remarks

The Mat keyword is required to pass an array to a subroutine or a function. The Mat statement is part of the argument list, and is separated from any other arguments by a comma. Both the calling program and the subroutine or function must use the Mat statement as part of the argument list. The matrix must be dimensioned before it is passed.

...

Code Block
/* The element values in MATRIX2 will be assigned to MATRIX1 such that MATRIX1(0) would have 0, MATRIX1(1,1) would have 1, MATRIX1(1,2) would be 2, and so forth.  
Then all elements of MATRIX2 are set to null. */
Dim MATRIX1(3,4), MATRIX2(12)
For CTR = 1 to 12
       MATRIX2 (CTR) = CTR
Next CTR
Mat MATRIX1 = Mat MATRIX2
Mat MATRIX2 = ""
/* The matrix CUST.REC and the variables YR and MO are passed as arguments. */
Call CREDIT(Mat CUST.REC, YR, MO)