|
Calling Procedures Written in Other Languages |
"strlen"(). This ensures the routine's
upper and lower case formatting is preserved.
When a routine is called, it may also return a value. The variable
_integer will hold this value if the routine returns an integer.
If the routine returns a pointer to a null-terminated character string
(char*), you can call the routine with the prefix
char*. After the routine completes, _string$ will
contain a copy of the returned string.
For example:
This demonstrates how _string$ automatically holds the returned string
when the routine is called with the char* prefix.
CSTRING$ is the other way to the same text: after a call made WITHOUT the
char* prefix, _integer holds the returned pointer as a number, and
cstring$ (no arguments) returns the null-terminated string at that address.
Use it when you want the address as well as the text, or decided on the prefix too late.
A null pointer (0) gives an empty string; a value that is not the address of readable memory
-- _integer after strlen, say -- raises the catchable exception
Bad CHAR* pointer (4011) rather than reading garbage.
msvcrt.dll library and
calls the strlen and _getcwd functions/routines.
msvcrt.dll) or
thoroughly validated custom DLLs.
library and call statements."strlen"())
to preserve case sensitivity.by ref explicitly when you need to pass
argument pointers._integer.char* string, prefix the
call with char*; the result is stored in
_string$.strlen and _getcwd from
msvcrt.dll.|
Hide Description
|
|
|
Enter or modify the code below, and then click on RUN |
|
Looking for the full power of Sheerpower?
Check out the Sheerpower website. Free to download. Free to use. |