Jens
unread,Jun 14, 2021, 5:19:21 AM6/14/21You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi,
I'm experimenting with calls from M to C but my C-experience is very small.
I've done this:
S VAR1="BCB",VAR2="DEF"
D &test.hello(VAR1,VAR2)
test.xc:
/home/aut/test.so
hello: ydb_status_t hello(I:ydb_string_t* ,I:ydb_string_t* )
test.c:
#include <stdio.h>
#include "libyottadb.h"
int hello(int argc, ydb_string_t stringA, ydb_string_t stringB)
{
printf("\nHello\n");
printf("\n");
printf("%s%d", "\nLength 1 ", stringA.length);
printf("%s%d", "\nLength 2 ", stringB.length);
printf("%s%d", "\nArguments ", argc);
printf("%s%s", "\nText 1 ", stringA.address);
printf("%s%s", "\nText 2 ", stringB.address);
return 0;
}
Result:
Hello
Length 1 2073116
Length 2 3
Arguments 2
Text 1
Text 2 BCBDEF
Why is the first length incorrect and the first text not shown?
Can anyone help?
Does anyone have an example with parameter transfer from an to M?
Jens