Passing Parameters by Reference?

BlitzPlus Forums/BlitzPlus Programming/Passing Parameters by Reference?

If it's about returning more than 1 var from a function (one of the advantages of reference vars): return a string! :)

;
; Return more than 1 var from a function
;
; stupid idea by: CS_TBL  ^____^
;

f1#=.9
f2#=.8

r$=bla$(f1#,f2#)

f1#=Mid$(r$,1,8)
f2#=Mid$(r$,9,8)

Notify "<"+f1#+"> <"+f2#+">"

End

Function bla$(a#,b#)
	a#=a#^3
	b#=b#^3

	Notify a#
	Notify b#
	
	Return RSet$(Left$(a#,8),8)+RSet$(Left$(b#,8),8)
End Function


As you see, this method allows you to return even more variables than you could return using reference vars, I guess one can return hundreds of vars this way :)

I dunno about banks.. they're a lil more comfy I guess, but I dunno about the potential mem they eat, if you don't free them (=overhead) .. strings are kinda harmless I think..

Well, cya at the weekly group-session-talk at "the assylum for B+ users who didn't buy Bmax yet" o_O