list functions sugestion
|
09-20-2015, 07:55 PM
(This post was last modified: 09-20-2015 08:40 PM by hpfx.)
Post: #1
|
|||
|
|||
list functions sugestion
Hello,
I've functions suggestion, it's related to list in programs. GET(L1,n) get n-th item of the list ex :GET({1, 2, 3},2) -> 2 FOREACH L1 AS var; END; to iterate lists items. ex: FOREACH {1,2} AS it; PRINT(it);END; note : or with alternative syntax (less block style) : FOREACH(L1,var); END; Arr2List() and List2Arr() convert array (vectors, matrix) to list and reverse.. ex:Arr2List([1, 2]) -> {1, 2} Arr2List([[1, 2][3,4]]) -> {{1, 2}{3,4}} Let me know your feeling about such suggestion, I do really like to have a foreach function like in many modern language, it makes life simplier to iterate into lists. And please, add a Lists menu in Cmds (program editing), to show existing list command like SIZE, SUB, POS ... Otherwise it's not obvious o guess such functions does exists... |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)