How to get the length of a list? [message #1784443] |
Wed, 28 March 2018 01:58  |
Eclipse User |
|
|
|
I have a small problem regarding getting the length of a list in RCPTT.
I have written a function which gets a list as a parameter. If I want to get th length of the list it returns 1, no matter how long the list actually is.
Example:
proc "my-func" [val list] {
show-alert [$list | length]
}
my-func [list "0" "1" "2" "3" "4" "5"] // returns 1
my-func [list "0" "1" "2" "3" "4"] // returns 1
my-func [list "0" "1" "2"] // returns 1
When i debugged, I found that $list is an EclList, which wraps java.util.List. so I thought I could get it via:
$list | get-object | invoke elements | invoke size
But it fails at "| get-object". So the question is, is there any way to get the length of list?
|
|
|
|
Powered by
FUDForum. Page generated in 0.23120 seconds