PROGRAM OpenArray;
    TYPE
        Array15 = Array[1..15] OF Integer;
    VAR
        I: Integer;
        A: Array[1..5] OF Integer;
        B: Array[1..10] OF Integer;
        C: Array15;

    PROCEDURE PrintArray(A: Array OF Integer);      { | open array in procedure}
        VAR                                         { | works perfectly with }
            I: Integer;                             { | arrays and array types }
    BEGIN
        FOR I := Low(A) TO High(A) DO
            Write(A[I], ' ');
        WriteLn;
    END;
BEGIN
    FOR I := Low(A) TO High(A) DO
        A[I] := I;

    FOR I := Low(B) TO High(B) DO
        B[I] := I;

    FOR I := Low(C) TO High(C) DO
        C[I] := I;

    PrintArray(A);
    PrintArray(B);
    PrintArray(C);
END.
