PROGRAM Scope1;
    VAR
        I: Integer;
    PROCEDURE Proc;
        {-------------------------------------}
        PROCEDURE NestedProc;
            VAR
                I: Integer;
        BEGIN
            I := 10;
            WriteLn('NestedProc I = ', I);
        END;
        {-------------------------------------}
    BEGIN
        NestedProc;
        WriteLn('Proc I = ', I);
    END;
BEGIN
    I := 20;

    WriteLn('start of main I = ', I);
    Proc();
    WriteLn('end of main I = ', I);
END.
