Supposedly, from everything I can find, Thrustmaster scripting language that I use for a Warthog HOTAS is close to real C language and in many cases it is but there are some things that just don't seem to work especially with strings. I've emailed TM support but given I have one ticket that's been ignored for quite a while I don't expect a response from them. Although it's been a while I'm familiar with C (it was one of the first languages I learned).
I simply want to concatenate two strings, s1 and s2. The strcat function is supposed to take s2 and append it to s1 so I do this.
alias s1 ="string1";
alias s2 = "string2";
strcat(&s1, &s2);
printf("....%s\x0a", &s1);
which prints only the word string1 instead of string1string2. The strlen function works but not this one. I've tried various combinations and ways including trying to get the return value (a pointer to s1 supposedly where the supposedly concatenated string is) in an integer and using it.
Any ideas on what I might be doing wrong? I've spent a lot of time looking for documentation (other then the TM stuff) but it there isn't much other than "it's C so you can write C and it will work".
Thanks.
I simply want to concatenate two strings, s1 and s2. The strcat function is supposed to take s2 and append it to s1 so I do this.
alias s1 ="string1";
alias s2 = "string2";
strcat(&s1, &s2);
printf("....%s\x0a", &s1);
which prints only the word string1 instead of string1string2. The strlen function works but not this one. I've tried various combinations and ways including trying to get the return value (a pointer to s1 supposedly where the supposedly concatenated string is) in an integer and using it.
Any ideas on what I might be doing wrong? I've spent a lot of time looking for documentation (other then the TM stuff) but it there isn't much other than "it's C so you can write C and it will work".
Thanks.