Why Is that colon there?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Why Is that colon there?

Patrick Larkin-2
I hate when I have to figure out code I wrote in a binge a couple years later.  Lasso is usually pretty readable.  

I have this array in a page and I don't know why the colon is there after the left parentheses.  It breaks if I remove it.  :(  What does it do and why did I put it there?  Or is there not enough information?

[var('types') = (:'curr','facil','fin','hr')]

Anyone?


Patrick

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Why Is that colon there?

Brad Lindsay-2
On Dec 19, 2012, at 2:32 PM, Patrick Larkin <[hidden email]> wrote:

> I hate when I have to figure out code I wrote in a binge a couple years later.  Lasso is usually pretty readable.  
>
> I have this array in a page and I don't know why the colon is there after the left parentheses.  It breaks if I remove it.  :(  What does it do and why did I put it there?  Or is there not enough information?
>
> [var('types') = (:'curr','facil','fin','hr')]

In Lasso 8.5/8.6 it is an array literal - shorthand for this code:

[var('types') = array('curr','facil','fin','hr')]



In Lasso 9 it is a staticarray literal - shorthand for this code:

[var('types') = staticarray('curr','facil','fin','hr')]



Brad
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Why Is that colon there?

Jolle Carlestam-3
In reply to this post by Patrick Larkin-2
It is a shortcut for array.
[var('types') = array('curr','facil','fin','hr')]

If this is for lasso 9 it's a shortcut for staticarray.

HDB
Jolle

Sent from a thin, flat, touchy device from an undetermined place in space.

19 dec 2012 kl. 20:33 skrev "Patrick Larkin" <[hidden email]>:

> I hate when I have to figure out code I wrote in a binge a couple years later.  Lasso is usually pretty readable.  
>
> I have this array in a page and I don't know why the colon is there after the left parentheses.  It breaks if I remove it.  :(  What does it do and why did I put it there?  Or is there not enough information?
>
> [var('types') = (:'curr','facil','fin','hr')]
>
>  
>
>
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Why Is that colon there?

Patrick Larkin-2
In reply to this post by Brad Lindsay-2
Of course!  Thank you!



On Dec 19, 2012, at 2:34 PM, Brad Lindsay wrote:

> On Dec 19, 2012, at 2:32 PM, Patrick Larkin <[hidden email]> wrote:
>
>> I hate when I have to figure out code I wrote in a binge a couple years later.  Lasso is usually pretty readable.  
>>
>> I have this array in a page and I don't know why the colon is there after the left parentheses.  It breaks if I remove it.  :(  What does it do and why did I put it there?  Or is there not enough information?
>>
>> [var('types') = (:'curr','facil','fin','hr')]
>
> In Lasso 8.5/8.6 it is an array literal - shorthand for this code:
>
> [var('types') = array('curr','facil','fin','hr')]
>
>
>
> In Lasso 9 it is a staticarray literal - shorthand for this code:
>
> [var('types') = staticarray('curr','facil','fin','hr')]
>
>
>
> Brad
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>