On 6 April 2014 18:54, Waldek Hebisch <[email protected]> wrote:
>
> I have now added 'uentries' to String. With it 'utf2cork'
> should look like:
>
> utf2cork(s : String) : String ==
> concat [cork(c) for c in uentries s]
>
> 'cork' should now take SingleInteger argument, and the table
> should consist of pairs (String, SingleInteger).
>
Thanks for this. I have a couple of questions.
Why did you choose List SingleInteger as the return type of uentries?
it seems a little none standard. I see that ucodeToString has Integer
-> String and
ord$Character returns Integer and char has Integer -> Character.
I wrote:
cork(x) ==
for i in Cork repeat
if ord(i.unicode.1)::SingleInteger = x then return i.corkcode
char(x::Integer)::String
but maybe that should be
cork(x) ==
for i in Cork repeat
if ord(i.unicode.1)::SingleInteger = x then return i.corkcode
ucodeToString(x::Integer)
I am not sure.
--
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 http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.