Size of a list passed to a function?
|
04-14-2017, 12:30 PM
(This post was last modified: 04-14-2017 12:31 PM by toml_12953.)
Post: #1
|
|||
|
|||
Size of a list passed to a function?
I'm trying to get the size of a list passed to a function. I've tried this:
PHP Code: EXPORT dimension(mylist) and PHP Code: EXPORT dimension(mylist) but neither works although SIZE does work from the Home screen. Tom L Tom L Cui bono? |
|||
04-14-2017, 12:43 PM
Post: #2
|
|||
|
|||
RE: Size of a list passed to a function?
PHP Code: EXPORT dimension(mylist) Works for me on the physical machine. Sorry for my english |
|||
04-14-2017, 02:17 PM
(This post was last modified: 04-14-2017 02:29 PM by toml_12953.)
Post: #3
|
|||
|
|||
RE: Size of a list passed to a function?
(04-14-2017 12:43 PM)Tyann Wrote: I over simplified my program. I'm shooting for a program to automatically create a multi-dimensional list and am hoping to use a variable number of dimensions. Right now, I have to create a loop for each dimension. Here's a better sample. It works for a fixed number of dimensions if I take out the PRINT. PHP Code: EXPORT dimension(varname,mylist) Tom L Cui bono? |
|||
04-14-2017, 02:29 PM
Post: #4
|
|||
|
|||
RE: Size of a list passed to a function?
Hello,
What are you passing as a parameter to the dimention function? Cyrille Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP. |
|||
04-14-2017, 02:42 PM
Post: #5
|
|||
|
|||
RE: Size of a list passed to a function?
(04-14-2017 02:29 PM)cyrille de brébisson Wrote: Hello, I'm calling it like this: As I said, it works fine if I take out the PRINT. dimension(L1,{4,3,5}) Tom L Tom L Cui bono? |
|||
04-14-2017, 02:58 PM
Post: #6
|
|||
|
|||
RE: Size of a list passed to a function?
(04-14-2017 02:17 PM)toml_12953 Wrote: I'm shooting for a program to automatically create a multi-dimensional list and am hoping to use a variable number of dimensions. This will create recursively a multi-dimensional list whose dimensions are passed as a list and initialized with 0: Code: EXPORT dimension(mylist) dimension({3,2,2}) returns {{{0,0},{0,0}},{{0,0},{0,0}},{{0,0},{0,0}}} |
|||
04-14-2017, 03:20 PM
(This post was last modified: 04-14-2017 03:33 PM by toml_12953.)
Post: #7
|
|||
|
|||
RE: Size of a list passed to a function?
(04-14-2017 02:58 PM)Didier Lachieze Wrote:(04-14-2017 02:17 PM)toml_12953 Wrote: I'm shooting for a program to automatically create a multi-dimensional list and am hoping to use a variable number of dimensions. Very elegant! As usual, I try to do things the hard way. Thank you for saving me a lot of work! Tom L Tom L Cui bono? |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)