Yes my code works, did you try it? How about providing an example of your problem code, so I can analyze it?
After answering your first post, it now seems your talking about something completely different; problems with passing a string between two programs:
I've tried again by calling the function from a seperate file with the
#Include DBAFileName$ command in the source and it still passed the text to it correctly.
Source:
Rem ***** Main Source File *****
Rem #Include "C:Program FilesDark Basic SoftwareDark Basic ProfessionalProjectsInclude_DisplayText.dba"
Rem I couldn't get a full path to target file to work, if it was in different location to the source.
Rem So, I put include file in same place as source and used the next line instead:
#Include "Include_DisplayText.dba"
_DisplayText("Displaying text within a function",0,0)
Wait Key
End
and
Include:
Function _DisplayText(MESSAGE$,X,Y)
W=Text Width(" ")
H=Text Height(" ")
Text X*W,Y*H,MESSAGE$ + " does work!"
EndFunction
Note: Make sure you put the include file in the same place as it's source. For some reason, even though I used a full path to the filename, DBPro couldnt find it's target.