The following program does not compile correctly because
I'm trying to pass the pointer of an array to a function
instead of the array itself. Is there a syntax that will
accomplish this?
------------------------------------------------------------
#COMPILE EXE
#REGISTER NONE
#INCLUDE "Win32Api.Inc"
FUNCTION ShowS3(x() AS STRING) AS LONG
MSGBOX X(3)
END FUNCTION
FUNCTION PBMAIN()
DIM S(1:10) AS STRING:FOR i&=1 TO 10:S(i&)=STR$(100+i&):NEXT
SPtr&=VARPTR(S())
'ShowS3 S() ' works fine, but how to pass a pointer instead?
ShowS3 SPtr&
END FUNCTION
I'm trying to pass the pointer of an array to a function
instead of the array itself. Is there a syntax that will
accomplish this?
------------------------------------------------------------
#COMPILE EXE
#REGISTER NONE
#INCLUDE "Win32Api.Inc"
FUNCTION ShowS3(x() AS STRING) AS LONG
MSGBOX X(3)
END FUNCTION
FUNCTION PBMAIN()
DIM S(1:10) AS STRING:FOR i&=1 TO 10:S(i&)=STR$(100+i&):NEXT
SPtr&=VARPTR(S())
'ShowS3 S() ' works fine, but how to pass a pointer instead?
ShowS3 SPtr&
END FUNCTION
Comment