FW: .gsf function return value doesnt work

P. R.M. romero619 at HOTMAIL.COM
Sat Apr 4 14:17:54 EDT 2009


Jennifer,
you had previously replied to this message, saying that you would look into this problem (functions within .gsf files dont correctly return a value when called from another/external .gsf/.gs script file).

have there been any updates on this?

Thanks,
P.Romero

----------------------------------------
> From: romero619 at hotmail.com
> To: gradsusr at list.cineca.it
> Subject: .gsf function return value doesnt work
> Date: Wed, 11 Mar 2009 10:37:33 -0700
>
>
> I'm reposting this question, since I dont know if the listserver rejected it the first time...
>
> I've never been able to get the following to work: use the 'return(varname)' statement within a .gsf function to return a value.
>
> I've only been able to accomplish the passing of variables around between scripts by using '_varname' global variables, but this defeats the whole purpose of creating a script function.
>
> I want to create a .gsf function that can actually return a value that can be directly assigned to a variable in a .gs file.
>
> example:
>
> *gsf file, addit.gsf
>
> function addit(var1,var2)
> sum=var1+var2
> return (sum)
>
> *test gs file, tst.gs
>
> rc = gsfallow("on")
> tx=addit(2,3)
> say '2+3 is 'tx
>
> however, this doesnt work...
> it simply prints '2+3 is ', so the gsf function is NOT returning the value of the 'sum' variable...
>
> Is this by design or am I doing something incorrectly?
> are global variables the ONLY way to pass variables between script/script function files?
>
> If this *is* by design, then I would please like to submit a request to COLA to consider fixing this in future versions.
>
> P.Romero
> _________________________________________________________________
> Windows Live™ Contacts: Organize your contact list.
> http://windowslive.com/connect/post/marcusatmicrosoft.spaces.live.com-Blog-cns!503D1D86EBB2B53C!2285.entry?ocid=TXT_TAGLM_WL_UGC_Contacts_032009
_________________________________________________________________
Rediscover Hotmail®: Now available on your iPhone or BlackBerry
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Mobile1_042009



More information about the gradsusr mailing list