Post Reply 
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.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: this short program crashes my PRIME - Michael de Estrada - 12-18-2013 06:28 AM



User(s) browsing this thread: 1 Guest(s)