String returned from C# to Fortran - problem

anthonyrichards
Total Points:
4,302
Status Points:
3,802
Brown Belt
November 27, 2008 2:05 AM PST
Rate
 
#5 Reply to #4
If you are sending strings to a program written with any type of 'C'- language, do you not have to terminate each string with the null (CHAR(0)) character first? That's how C knows where the string ends. Any string length argument returned by Fortran must therefore include the terminating null character in the count so the C-side string length must match or exceed this length.
Also, whenever a 'C'-type program sends a reference to a string, the string will be terminated with a null character too, so looking for the null character lets you find the string's length.


Intel Software Network Forums Statistics

8472 users have contributed to 31603 threads and 100653 posts to date.
In the past 24 hours, we have 31 new thread(s) 112 new posts(s), and 166 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member Edwin B. Ramayya