hoanglo 3 Posted February 24, 2016 Report Share Posted February 24, 2016 Hi guys,I'm stuck at getting a local variable value from a 2nd define (function) to use in the main define (command).The main define runs the 2nd define in a thread.Please help. Thanks very much Quote Link to post Share on other sites
pash 504 Posted February 24, 2016 Report Share Posted February 24, 2016 use "return" command work for "define function" only alert($Test()) define $Test { comment("Local Variable") set(#_test,"test","Local") return(#_test) } Quote Link to post Share on other sites
hoanglo 3 Posted February 24, 2016 Author Report Share Posted February 24, 2016 use "return" command work for "define function" only alert($Test()) define $Test { comment("Local Variable") set(#_test,"test","Local") return(#_test) }Thank you.What if I have 2 variables in the define function that I need to return?How to return both of them? Quote Link to post Share on other sites
pash 504 Posted February 24, 2016 Report Share Posted February 24, 2016 this for return more one clear all data add list to list(%MyList,$list from text($Test(),$new line),"Delete","Global") alert($replace($list item(%MyList,0),"##NL##",$new line)) alert($replace($list item(%MyList,1),"##NL##",$new line)) define $Test { comment("Local List") add item to list(%_data,$replace("Emma, Official Sponsor of the UnPodcast In this episode of the UnPodcast, we celebrate Valentine’s Day by sharing wicked awkward interview stories.",$new line,"##NL##"),"Don\'t Delete","Local") add item to list(%_data,$replace("[00:00:00.00]Emma Sponsorship Mention [00:00:42.27]Episode Overview [00:01:06.25]Emma Sponsorship Mention [00:01:18.00]What Our Obsession, with Emma?!? [00:02:07.22]Scott’s Nightmare Morning [00:05:44.28]The Internet Makes a Great Valentines Day Date [00:09:28.19]Emma Sponsorship Mention [00:10:14.03]Awkward Interview Stories Are Wonderfully Horrible [00:23:57.28]Scott’s Awkward Interview Story [00:24:59.13]That One Interview Question (That’s Actually Horrible) [00:30:00.19]A Smart Panel Intervie",$new line,"##NL##"),"Don\'t Delete","Local") return(%_data) } Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.