I was trying to find a simple way to convert a Lisp character (e.g.
_$Newline$Lisp) to an Axiom Character. Does the following experiment in the
interpreter suggest an approach to adding character?:%->Boolean and
character:%->Character to the SEX domain? The SExpressionCategory does not
incorporate characters and Characters - does anyone know why?
(8) -> character?(x:SEX):Boolean == if CHARACTERP(x)$Lisp=T$Lisp then true else
false -- hack for the interpreter
Type: Void
(9) -> character(x:SEX):Character == if character?(x) then char integer
CHAR_-CODE(x)$Lisp else error "Non-character"
Type: Void
(10) -> character? _$Newline$Lisp
(10) true
Type: Boolean
(11) -> character _$Newline$Lisp
(11)
Type: Character
Kindly, Mark.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Mark Clements
Sent: Tuesday, 31 January 2012 12:02 AM
To: [email protected]
Subject: RE: [fricas-devel] newLine : Character
Some of the following may not constitute good style:
(1) -> newline() == char(10)$Character -- declaration not required in recent
Fricas or OpenAxiom
Type: Void
(2) -> newline()
(2)
Type: Character
(3) -> string FORMAT(nil,"Hello, World!~%")$Lisp -- for Lispers
(3) "Hello, World!
"
Type: String
(4) -> format(template:String,input:List String):String ==
string APPLY('FORMAT,append([LIST()$Lisp,template::SEX],input::List
SEX)::SEX)$Lisp
Type: Void
(5) -> format("~a~%",["Hello, World!"])
(5) "Hello, World!
"
Type: String
(6) -> say ["Hello, World!",newLine()] -- historical and simple
Hello, World!
Type: Void
Kindly, Mark Clements.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Serge D. Mechveliani
Sent: Monday, 30 January 2012 8:00 PM
To: [email protected]
Subject: [fricas-devel] newLine : Character
Please,
how to express the newline character?
(char "\n" does not work)
Where in docs it is explained?
Thanks.
------
Sergei
[email protected]
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.