WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Variables and Parameters

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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
File Created: 2001:01:08:12:43:54
Last Updated: 2001:01:08:12:43:54