String returned from C# to Fortran - problem

onkelhotte
Total Points:
2,900
Status Points:
2,400
Brown Belt
November 24, 2008 11:56 PM PST
Rate
 
#3 Reply to #2
Damn, I posted the wrong Fortran code... It´s too early in the morning and I haven´t had any coffee yet ;-)
globaleVariablen is a module where username is declared as character*4. In the C# part you have to name the length of the character, so you write get_username(stringBuilderValue, 4), although the Fortran function doesn´t have a second parameter. 

 

 

	subroutine put_username(value)
		use globaleVariablen
		implicit none
		character*4 username
		username = value
	end subroutine put_username
!
	character*4 function get_username()
		use globaleVariablen
		implicit none
		getusername = username
	end function get_username
Markus


Intel Software Network Forums Statistics

8484 users have contributed to 31619 threads and 100691 posts to date.
In the past 24 hours, we have 34 new thread(s) 123 new posts(s), and 181 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 monkeybrains