String returned from C# to Fortran - problem

onkelhotte
Total Points:
2,880
Status Points:
2,380
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

8289 users have contributed to 31235 threads and 99108 posts to date.
In the past 24 hours, we have 7 new thread(s) 24 new posts(s), and 31 new user(s).

In the past 3 days, the most popular thread for everyone has been comparison cilk++, openmp, pthreads first results The most posts were made to comparison cilk++, openmp, pthreads first results The post with the most views is Very amusing...  Escalated as

Please welcome our newest member Michael Johanson