synonyms

Mike Bonner bonnmike at gmail.com
Thu Jun 29 12:43:57 EDT 2017


yeah, that was kinda my point.  It bipasses the need to jump through all
the hoops of building up the proper string, then having to break it into
parts on the other end.  My earlier example (way over simplified) ended up
using split create an array out of name value pairs.. It just makes more
sense to me, to pass in the array to begin with.

Having said that, building such a string could be simplified using merge..
doSomething 12,4, merge("size=[[tsize]],row=[[gAData]]")

But again, you either do the work first (and build the array to send)  or
you do the work after (and break up the name value pairs after the fact.)
 It just seems simpler to me to use arrays from the start.

On Thu, Jun 29, 2017 at 10:31 AM, Alex Tweedly via use-livecode <
use-livecode at lists.runrev.com> wrote:

> On 29/06/2017 17:17, Mike Bonner via use-livecode wrote:
>
>> The thing about passing in as an array is.. its just a different form of
>> name value pairs, so it sidesteps the whole issue.
>> alue pairs.
>>
>
> Not quite - there's a crucial difference.
>
> Using an array for name/value pairs, you can pass in an array as an actual
> parameter.
>
> You can't do that with strings for the name/value pairs.
>
>    put gAData into tA["row"]
>    put 100 into tA["size"]
>    DoSomething 12, 4, tA
>
> but you can't do
>    DoSomething 12, 4, "size=100", "row=" & gAData
> because the array gAData can't be automatically converted to/from a string
> to pass it.
>
> -- Alex.
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list