calling an api from a stack?

Bob Sneidar bobsneidar at iotecdigital.com
Fri Jun 15 17:33:57 EDT 2018


Yes, but you found more utility than I was thinking of. My thing is that when tracing/debugging, I need to see what a function returns, and I can only do that if I put the returned value or it or the result into a variable of some sort. 

Bob S


> On Jun 15, 2018, at 14:28 , Mike Bonner via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> If you mean using merge inside the function, I guess one could do the merge
> beforehand and pass it in as a parameter, or alternatively do the merge in
> the function and return the generated url string as part of the returned
> value.  IE change it like so..
> function translate pText,pLang
>   put merge(kGetTransUrl) into tUrl
>   get url tUrl
>   return "URLString: " & tUrl & cr & it
> end translate
> 
> Then just dump the first line if things are working right.  Hmm. Actually,
> pre-merging is nice because it would allow the use of "load" with callbacks
> for multiple url calls. Use the callback to process, part of which lets you
> see the URL associated with the callback.  Sounds like a better option than
> using a function call for sure.





More information about the Use-livecode mailing list