I was basically going according to book.pdf. I'm not aware if there are 
better ways to do file I/O in fricas. I have a large script that does many 
algebraic calculations and then outputs the result to a file. The output 
consists of algebraic types as well as strings of text and I don't know how 
to output them all together nicely! Also, I'm not familiar with SPAD.

On Wednesday, November 24, 2021 at 3:06:19 PM UTC-6 [email protected] 
wrote:

> Why do you think it is wrong?
>
> https://github.com/fricas/fricas/blob/master/src/algebra/files.spad#L132
>
> Honestly, I could not judge this. The docstring for write!
>
>
> http://fricas.github.io/api/FileCategory.html#l46696c6543617465676f7279-777269746521
>
> is not very precise.
>
> The only thing you can say is that it is not what you expected.
> Just to make things clear.
>
> OK, but that doesn't help you. I was anyway wondering why you would be
> satisfied with output that looks pretty LISP like. Is this really what
> you want?
>
> Don't just work on "somehow getting some output". Try to specify exactly
> what you want and how you want it. Maybe your input data comes in a
> certain format from somewhere and you want you output in a certain
> format for further use. So what is it?
>
> Maybe putting together a few lines of FriCAS code and a little shell
> script may better serve your purpose. However, to be able to help you,
> you must be much clearer.
>
> Ralf
>
> PS:
> I actually don't care about what write! outputs. I never had such a need
> to use it. As I said before, the fricas output of
> https://fricas.github.io/book.pdf was produced automatically. And since
> I programmed it I know that there is not write! command in the process.
>
>
>
> On 24.11.21 20:34, Sid Andal wrote:
> > 
> > I have an output file opened of type union (for mixed types):
> > 
> > f : File Union(List Integer, String) := open("test.out", "output")
> > write!(f, [1,2,3,4,5,6,7,8])
> > write!(f, "0123456789")
> > close!(f)
> > 
> > Here's the content of test.out:
> > 
> > (0 1 2 3 4 5 6 7 8) 
> > 
> > (1 . "0123456789")
> > 
> > The 2nd line containing the string doesn't look right. How do I print 
> the 
> > string itself (without the prefix 1.) and without the double-quotes?
> > 
>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/0a4e2904-603b-41be-a3cd-abef6fd48faan%40googlegroups.com.

Reply via email to