[GAP Forum] Putting variables in strings

Frederic Vanhove fvanhove at cage.UGent.be
Fri Nov 16 12:01:39 GMT 2012


Hello

this is probably a very basic thing but I struggled to find the proper 
commands.
I would like to have GAP write output to several files, the names of 
which are automatically generated.

So I would like to have something like this:

for i in [1..10] do
PrintTo("outputfile"+i+".txt", i^3);
od;

Essentiallly, I just have to find the right way to get the proper string.
How can I do this?

Thanks,
Frédéric



More information about the Forum mailing list