neilsf / xc-basic3

A BASIC cross compiler for MOS 6502-based machines
MIT License
44 stars 5 forks source link

@ (address of) operator cannot find variable with function name inside TYPE #246

Open orlof opened 1 year ago

orlof commented 1 year ago

e.g.

TYPE T
    FUNCTION f AS BYTE() STATIC
        POKE @f, 0
    END FUNCTION
END TYPE
neilsf commented 1 year ago

What are you trying to achieve here, to get a pointer to the function f()?

orlof commented 1 year ago

I try to get the pointer to the implicit variable that holds the return value. Seems that I can assign to it, but I cannot get the address.

neilsf commented 1 year ago

I see. It looks like it works outside a TYPE, but not within.