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 WorkeeeHowever *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 scriptuser="john" call("foo.wbt",user) Message(user,retvalue)And then in the file, foo.wbt:retvalue=strcat("Hello there ",param1) returnNote: with the User defined functions,introduced in WinBatch 2001A, you can do better than this...
Article ID: W14168Filename: Return a Value from a Call.txt