Re: arrays with merge

2015-06-05 Thread Peter TB Brett
On 2015-06-05 17:22, Ali Lloyd wrote: On 5 June 2015 at 16:13, Dr. Hawkins wrote: On Fri, Jun 5, 2015 at 7:31 AM, Peter Haworth wrote: > Well I missed the countdown so I'll +1your post. > and I'll +2. The things that I would most like to add to livecode would be strict compilation being th

Re: arrays with merge

2015-06-05 Thread J. Landman Gay
On June 5, 2015 10:13:03 AM CDT, "Dr. Hawkins" wrote: > >The things that I would most like to add to livecode would be strict >compilation being the default, absolute case sensitivity (unless turned off >for comparisons), and strong typing of variables. Oh, and c-style >variable scoping. In that

Re: arrays with merge

2015-06-05 Thread Ali Lloyd
In that case I can highly recommend trying LiveCode Builder ;-) On 5 June 2015 at 16:13, Dr. Hawkins wrote: > On Fri, Jun 5, 2015 at 7:31 AM, Peter Haworth wrote: > > > Well I missed the countdown so I'll +1your post. > > > > and I'll +2. > > The things that I would most like to add to livecode

Re: arrays with merge

2015-06-05 Thread Dr. Hawkins
On Fri, Jun 5, 2015 at 7:31 AM, Peter Haworth wrote: > Well I missed the countdown so I'll +1your post. > and I'll +2. The things that I would most like to add to livecode would be strict compilation being the default, absolute case sensitivity (unless turned off for comparisons), and strong ty

RE: arrays with merge

2015-06-05 Thread Peter Haworth
> Evergreen Information Services > rdim...@evergreeninfo.net > > > -Original Message- > From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On > Behalf > Of Mike Bonner > Sent: Friday, June 05, 2015 9:42 AM > To: How to use LiveCode > Subject: Re: arrays wi

RE: arrays with merge

2015-06-05 Thread Ralph DiMola
onner Sent: Friday, June 05, 2015 9:42 AM To: How to use LiveCode Subject: Re: arrays with merge As ali said, the unquoted key is only an issue if there is a declared variable, at which point the key becomes whatever is in that variable. (or if its a keyword of course) I use the "store the s

Re: arrays with merge

2015-06-05 Thread Mike Bonner
As ali said, the unquoted key is only an issue if there is a declared variable, at which point the key becomes whatever is in that variable. (or if its a keyword of course) I use the "store the string elsewhere" method. When creating merge strings for later use, I either create them using the pro

Re: arrays with merge

2015-06-05 Thread Ali Lloyd
Yes, that is LiveCode 'unquoted literal' mechanism - It is the same as, for example, (if you have strict compilation off) *put* tTest & "sdfsdf" -- puts tTestsdfsdf into the message box When a variable has not been declared, any tokens that are not keywords are treated as strings. On 5 June 20

Re: arrays with merge

2015-06-05 Thread Terence Heaford
Interestingly it works without quotes around test. It does work but should it? This suggests the only reason for quotes in array keys is in case you have a two word key? put merge("SELECT [[tColumns]] FROM '[[tTable]]' [[myArray[test]]] [[tSortOrder]]") into tSQL All the best Terry > On 5

Re: arrays with merge

2015-06-05 Thread Ali Lloyd
Hi, The reason put merge("SELECT [[tColumns]] FROM '[[tTable]]' [[myArray["test"]]] [[tSortOrder]]") into tSQL doesn't work is the double quote around "test". Merge should work fine with arrays (I should know because bug 11274 was one of the first I ever fixed!) You can either use & and quote t

Re: arrays with merge

2015-06-05 Thread Lyn Teyla
> function myArray pString > return myArrayTest[pString] > end myArray Small typo: myArrayTest[pString] should of course be: myArray[pString] ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscr

Re: arrays with merge

2015-06-05 Thread Lyn Teyla
> Terence Heaford wrote: > > This line gives a syntax error, obviously because an array does not work in > merge? > > put merge("SELECT [[tColumns]] FROM '[[tTable]]' [[myArray["test"]]] > [[tSortOrder]]") into tSQL > > Is there a way around this or do I have to resort to using &? Method 1

Re: arrays with merge

2015-06-05 Thread Terence Heaford
Did this and I still get a syntax error. put merge("SELECT [[tColumns]] FROM '[[tTable]]' [[ myArray["test”] ]] [[tSortOrder]]") into tSQL Any ideas Thanks Terry > On 5 Jun 2015, at 07:42, Monte Goulding wrote: > > Add a space between the array bracket and the merge brackets > >> On 5 Jun

Re: arrays with merge

2015-06-05 Thread Terence Heaford
Also tried it with one space after array as put merge("SELECT [[tColumns]] FROM '[[tTable]]' [[myArray["test”] ]] [[tSortOrder]]") into tSQL Still got a syntax error. LC 6.7.5 Mac. Is there a solution? All the best Terry > On 5 Jun 2015, at 07:55, Terence Heaford wrote: > > Did this a

Re: arrays with merge

2015-06-04 Thread Monte Goulding
Add a space between the array bracket and the merge brackets > On 5 Jun 2015, at 4:27 pm, Terence Heaford wrote: > > This line gives a syntax error, obviously because an array does not work in > merge? > > put merge("SELECT [[tColumns]] FROM '[[tTable]]' [[myArray["test"]]] > [[tSortOrder]]")