[Gambas-user] Need to pass a string by ref
Eric Damron
edamron at ...776...
Sat Jan 8 23:51:25 CET 2005
I'm finding not being able to pass simple datatypes by reference really
annoying. I need to create a function that returns a boolean but also
returns a string. In VB I would pass in a string by reference. I've
tryed to pass in a string array but I can't seem to get the syntax
correct. Can someone help me out.
Private Sub foo()
Dim strS[2] as String
strS[0] = "Some String"
strS[1] = ""
if foo2(strS[]) THEN
' do some stuff
End If
End
private FUNCTION foo2(strString[] as string) AS Boolean
strS[1] = "Some other string"
Return TRUE
End
More information about the User
mailing list