Re: [phix] Learn Phix in Y Minutes

new topic     » goto parent     » topic index » view thread      » older message » newer message
   --              1   2   3   4   5    -- index head to tail 
    sequence s = { 10, 20, 30, 40, 50 } 
    --             -5  -4  -3  -2  -1    -- index tail to head 
 
        // one item 
            ? s[2] 
            ? s[-4] 
                        -- output for both is: 
            ----->  30 

Are you sure about that? I mean, we got New Math and all that, but my computer is so old it still thinks it should be 20.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu