On 13.04.22 18:03, Sid Andal wrote:
> The output file type is for Integers and each solution (hundreds of
> thousands of them) is tagged with a six-digit integer identifier for
> searching and analysis purposes. Leading zeros allow to distinguish
> these tags from other integers (the solutions).
Are you sure you want a leading zero as a distinction of the different
types of solutions?
A little example of input/output would have been very helpful.
> I was thinking about converting the tags with leading zeros into
> strings, but, then writing them out will be a problem since output
> file is of type Integer.
Hmmm... first thing that comes to my mind is add 10^50 to your tags and
then rely on the fact that a "tag" number starts with "10". ;-)
Honestly, I find the File(S) feature rather lispy, anyway. It's
seamingly not really meant for communication with other programs, but
rather with writing out and reading back into FriCAS itself.
But, Kurt has another solution. You can use the function FORMAT from the
Lisp that is present underneath FriCAS. That is not a SPAD-only
solution, but for your purpose it would probably be the simplest way to
achieve your goal.
I leave it to Kurt to post the details.
Ralf