An array of pointers in Clarion

Hi !

Do I understand correctly that you cannot declare an array of pointers in Clarion?

ArrayRef  &Long,Dim(10)

There are no errors in the development environment itself, but it does not compile. :frowning:
Thanks !

Hi

No you canโ€™t but you can change the code slightly and create a GROUP DIM(10) Array.

                    PROGRAM

                    MAP
                    END
ArrayGroup          Group,DIM(10)
ArrayRef                &Long   !,Dim(10)
                    END
TestLong            LONG

    CODE
    TestLong = 10
    ArrayGroup[1].ArrayRef &= TestLong
    STOP(ArrayGroup[1].ArrayRef)
    ArrayGroup[1].ArrayRef = 20
    STOP(TestLong)

Not quite what you were after, but close.

Mark

1 Like

Thanks ! This solution suits me. :slight_smile: