xc-basic3 icon indicating copy to clipboard operation
xc-basic3 copied to clipboard

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

Open orlof opened this issue 2 years ago • 3 comments

e.g.

TYPE T
    FUNCTION f AS BYTE() STATIC
        POKE @f, 0
    END FUNCTION
END TYPE

orlof avatar Sep 17 '23 08:09 orlof

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

neilsf avatar Sep 17 '23 09:09 neilsf

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.

orlof avatar Sep 17 '23 09:09 orlof

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

neilsf avatar Sep 17 '23 09:09 neilsf