Define_function & Arrays
bogdan
Posts: 42
Hello...
Anyway...does know how to return an array from a function and if it is possible?
For example....
DEFINE_FUNCTION CHAR TEST(ARRAY[])
{
LOCAL_VAR CHAR FINAL_ARRAY[20]
// do something with array
RETURN(FINAL_ARRAY)
}
Or can we get pointers like C++ to work in Netlinx??
Here is what I am getting from Netlinx log
1: 07-01-2004 THU 03:45:03 Interpreter CopyString (Reference) - Error 1 S=0x0000 D=0x1011
2: 07-01-2004 THU 03:45:03 Interpreter GetString - Error 1 Tk=0x0001
3: 07-01-2004 THU 03:45:03 Interpreter CopyString (Reference) - Error 2 S=0x1011 D=0x1001
4: 07-01-2004 THU 03:45:02 Interpreter CopyString (Reference) - Error 1 S=0x0000 D=0x1011
Anyway...does know what S=0x0000 D=0x1011 Tk=0x0001
is referring to?
Thanks... Bogdan
Anyway...does know how to return an array from a function and if it is possible?
For example....
DEFINE_FUNCTION CHAR TEST(ARRAY[])
{
LOCAL_VAR CHAR FINAL_ARRAY[20]
// do something with array
RETURN(FINAL_ARRAY)
}
Or can we get pointers like C++ to work in Netlinx??
Here is what I am getting from Netlinx log
1: 07-01-2004 THU 03:45:03 Interpreter CopyString (Reference) - Error 1 S=0x0000 D=0x1011
2: 07-01-2004 THU 03:45:03 Interpreter GetString - Error 1 Tk=0x0001
3: 07-01-2004 THU 03:45:03 Interpreter CopyString (Reference) - Error 2 S=0x1011 D=0x1001
4: 07-01-2004 THU 03:45:02 Interpreter CopyString (Reference) - Error 1 S=0x0000 D=0x1011
Anyway...does know what S=0x0000 D=0x1011 Tk=0x0001
is referring to?
Thanks... Bogdan
0
Comments
You can send back arrays out of a function in this way:
DEFINE_FUNCTION CHAR[20] TEST(ARRAY[])
{
LOCAL_VAR CHAR FINAL_ARRAY[20]
// do something with array
RETURN(FINAL_ARRAY)
}
Best regards,
Marc
It is working like a clock.