Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


Return a Value from a Call

Keywords: 	  Return a Value from a Call

Question:

Is it possible to return a value from a Call to a wbc with the 99G version of WinBatch?

Answer:

Well....No and Yes.

You cannot return a value from a call persay like

	a=Call("foo.wbt","") ; No Workeee
However *all* variables are global (in common and stompable by anything), so what I do is set a variable "retvalue" in my calls and then use retvalue in my main script
	user="john"
	call("foo.wbt",user)
	Message(user,retvalue)
And then in the file, foo.wbt:
	retvalue=strcat("Hello there ",param1)
	return

Note: with the User defined functions,introduced in WinBatch 2001A, you can do better than this...


Article ID:   W14168
Filename:   Return a Value from a Call.txt