|
|
polygone
|
|
Reply #17 Posted on: September 15, 2012, 10:49:04 am |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
These things look like a mess to me.
|
|
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
|
Josh @ Dreamland
|
|
Reply #19 Posted on: September 15, 2012, 11:34:44 am |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Agreed with HaRRi, again. Zero seems like an elegant solution.
I'd just make them use array subscripts, except it may not always be the case that the function returns an array of only two elements. It may return five, and the user needs only four.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
Josh @ Dreamland
|
|
Reply #21 Posted on: September 15, 2012, 02:45:55 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Unfortunately, GML ambiguates [1,2]. It means the same as [1][2]. Otherwise we could do all sorts of neat array tricks.
Perhaps array[[1,2]] could work.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
Josh @ Dreamland
|
|
Reply #23 Posted on: September 16, 2012, 09:08:58 am |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
If we allow arbitrary element access by using an array as an array subscript, and we let 1..5 be the same as [1, 2, 3, 4, 5] (and maybe let 1..2..9 be [1,3,5,7,9]), then that will work.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|