this short program crashes my PRIME
|
12-18-2013, 06:28 AM
(This post was last modified: 12-18-2013 02:11 PM by Michael de Estrada.)
Post: #4
|
|||
|
|||
RE: this short program crashes my PRIME
(12-18-2013 06:14 AM)Namir Wrote: I think the problem is with using SIZE in the FOR Loop. SIZE returns a list and not a scalar. You should assign the result of SIZE to a list first and then access the first element of that list as the upper loop limit. Are you sure ? According to the Prime Help for SIZE, it accepts a list as the input and returns a scalar representing the number of element in the list, so for this program it should be 7. I just checked it out and it does works that way, so for example SIZE({{1,2,3},{4,5,6},{7,8,9},{10}}) returns 4. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
this short program crashes my PRIME - Marek Russ - 12-18-2013, 12:06 AM
RE: this short program crashes my PRIME - Michael de Estrada - 12-18-2013, 03:11 AM
RE: this short program crashes my PRIME - Namir - 12-18-2013, 06:14 AM
RE: this short program crashes my PRIME - Michael de Estrada - 12-18-2013 06:28 AM
RE: this short program crashes my PRIME - cyrille de brébisson - 12-18-2013, 07:35 AM
RE: this short program crashes my PRIME - Marek Russ - 12-18-2013, 08:20 AM
|
User(s) browsing this thread: 1 Guest(s)