[Let's try to answer without technical reply. Hope to not break or shift the thread]

On 2023-01-11 22:33:10, Stefan Du Rietz wrote:

Too print all elements, the argument must be a column vector: fac'
And to avoid repeating the first wording, you can print it separately:

--> mprintf("Factors of 1729 are: "), mprintf("%d  ", fac')
Factors of 1729 are: 7  13  19

Stefan

Yes, i have well read your previous answer. I was just providing an alternative.

That was not the initial querry, but write() allows to iterate on rows AND columns in the same way, adapting to free numbers of rows AND columns with the same unique simple syntax:

--> fac = grand(3,4,"uin",0,9)
 fac  =
   2.   5.   9.   3.
   2.   4.   5.   5.
   4.   1.   8.   5.

--> write(%io(2), fac, "(''The row is:'', 10(i2,2x))")
The row is: 2   5   9   3
The row is: 2   4   5   5
The row is: 4   1   8   5

One could dream of extending the C syntax with this Fortran feature...
The first days of January are a good for wishes :-)

Samuel
_______________________________________________
users mailing list - users@lists.scilab.org
Click here to unsubscribe: <mailto:users-unsubscr...@lists.scilab.org>
http://lists.scilab.org/mailman/listinfo/users

Reply via email to