On 27.01.2018 02:40, 'Nasser M. Abbasi' via FriCAS - computer algebra system wrote: > sorry if this is a basic question, I am very much a newbie in Fricas.
Not at all, that it is the purpose of a forum. > > I am trying to make the file name as a string variable fileName. > > But when I pass it to )set output tex fileName, Fricas uses the literal name > "fileName" as > the file name, instead of the value of the variable as one would expect ! Note that commands starting with ")" are not really part of the programming language (though they are called 'system commands'). Instead you want use "systemCommand" from the MoreSystemCommands package: http://fricas.github.io/api/MoreSystemCommands.html?highlight=systemcommand systemCommand: String -> Void Example: -> fileName := "foo.tex" -> systemCommand("set output tex " fileName) TeX output will be written to file /home/kfp/foo.tex . Type: Void Notice string concatenation in spad: "hello " "there" " !" => "hello there !" > > Here is an example > > (1) -> fileName := "foo.tex" --- Variable contain the file name to write to > (2) -> )set output algebra off > (2) -> )set output tex on > (2) -> )set output tex fileName > > TeX output will be written to file fileName.stex . > > > Notice it wants to write to "fileName.stex" and not to "foo.tex" > > Does one need special syntax to tell it to use the VALUE of the variable? > > thanks > --Nasser > > -- > 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] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at https://groups.google.com/group/fricas-devel. > For more options, visit https://groups.google.com/d/optout. -- 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.
