Menu

#3617 lindex behaves strangely

obsolete: 8.5a6
closed-fixed
9
2007-01-09
2007-01-09
No

I am testing on 85a6 where lindex is behaving rather strangely. See the following interactive session

() 24 % lindex 0 "a b"
a
() 25 % lindex "a b" 0
a

So it seems the order of arguments can be reversed.
This leads to problems:

) 27 % lindex 1 0 ; # expected to return 1
() 28 % lindex [list 1] 0
1
() 29 %

Discussion

  • Donal K. Fellows

    • labels: 105658 --> 47. Bytecode Compiler
    • milestone: --> obsolete: 8.5a6
    • priority: 5 --> 9
    • status: open --> closed-fixed
     
  • Donal K. Fellows

    Logged In: YES
    user_id=79902
    Originator: NO

    It was a mistake I made in the [lindex] compiler.