[Scilab-users] Basic query - mprintf

Samuel Gougeon sgougeon at free.fr
Wed Jan 11 00:11:43 CET 2023


Le 07/04/2022 à 09:50, Lester Anderson a écrit :
> Hello all,
>
> Very basic query but how do you print all the values from a result via 
> mprintf?
>
> e.g.
>
> fac = factor(1729)
> 7 13 19
>
> mprintf('Factors of 1729 are: %d\n', fac)
> just prints 'Factors of 1729 are: 7
>
You may also use a Fortran syntax -- that supports automatic inline 
iterations, unlike C syntaxes -- instead of a  C one:

--> fac = factor(1729);
--> write(%io(2), fac, "(''Factors of 1729 are:'', 10(i2,2x))")

Factors of 1729 are: 7  13  19

Samuel

PS : i no longer receive messages from users@ since 2022-10-05 (last 
received).
So for the time being, i answer to old threads, to not break recent ones 
to which i can't reply, just read archives.




More information about the users mailing list