Loading ...
Sorry, an error occurred while loading the content.

Re: Syntax error: let a1 = 1 | let b = [1,2,3] | echo b[a1:-1] => Undefined variable a1:

Expand Messages
  • Thomas
    ... Ruby uses .. for this (eg a[2..-1]), which has a mathematical touch. Putting spaces before and after the colon is perfectly ok for me though -- now that I
    Message 1 of 3 , Apr 29, 2007
    • 0 Attachment
      > Using ":" both for scopes and Sublist is not ideal. But it's hard to
      > think of something that is better.

      Ruby uses .. for this (eg a[2..-1]), which has a mathematical touch.
      Putting spaces before and after the colon is perfectly ok for me though
      -- now that I know it.
    Your message has been successfully submitted and would be delivered to recipients shortly.