You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently you can use str only in asmsub signature, for regular subroutines the compiler gives an error about that reference types should be an uword.
examples/test.p8:10:0: ERROR Pass-by-reference types (str, array) cannot occur as a parameter type directly. Instead, use an uword to receive their address, or access the variable from the outer scope directly.
This should be fixed so that str can be used in signature .
(The issue is related to the way subroutine params are treated as local variables.)
Ideally we do the same for array types but that's a different issue, one that is difficult to solve because the compiler now treats array vars as a direct (name) reference to the array in memory. Passing different arrays in the place of an array var can't be done right now.
The text was updated successfully, but these errors were encountered:
Currently you can use
str
only inasmsub
signature, for regular subroutines the compiler gives an error about that reference types should be anuword
.This should be fixed so that
str
can be used in signature .(The issue is related to the way subroutine params are treated as local variables.)
Ideally we do the same for array types but that's a different issue, one that is difficult to solve because the compiler now treats array vars as a direct (name) reference to the array in memory. Passing different arrays in the place of an array var can't be done right now.
The text was updated successfully, but these errors were encountered: