<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">If it works as a subroutine in a script but not as a .gsf, then it's probably a bug. I will look into it. --Jennifer<div><br><div><br><div><div>On Mar 11, 2009, at 1:37 PM, Pablo Romero wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>I'm reposting this question, since I dont know if the listserver rejected it the first time...<br><br>I've never been able to get the following to work: use the 'return(varname)' statement within a .gsf function to return a value.<br><br>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.<br><br>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.<br><br>example:<br><br>*gsf file, addit.gsf<br><br>function addit(var1,var2)<br>sum=var1+var2<br>return (sum)<br><br>*test gs file, tst.gs<br><br>rc = gsfallow("on")<br>tx=addit(2,3)<br>say '2+3 is 'tx<br><br>however, this doesnt work...<br>it simply prints '2+3 is ', so the gsf function is NOT returning the value of the 'sum' variable...<br><br>Is this by design or am I doing something incorrectly?<br>are global variables the ONLY way to pass variables between script/script function files?<br><br>If this *is* by design, then I would please like to submit a request to COLA to consider fixing this in future versions.<br><br>P.Romero<br>_________________________________________________________________<br>Windows Live™ Contacts: Organize your contact list.<br><a href="http://windowslive.com/connect/post/marcusatmicrosoft.spaces.live.com-Blog-cns!503D1D86EBB2B53C!2285.entry?ocid=TXT_TAGLM_WL_UGC_Contacts_032009">http://windowslive.com/connect/post/marcusatmicrosoft.spaces.live.com-Blog-cns!503D1D86EBB2B53C!2285.entry?ocid=TXT_TAGLM_WL_UGC_Contacts_032009</a><br></div></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></div></span> </div><br></div></div></body></html>