Ralf Hemmecke wrote:
> 
> Hello,
> 
> it looks like SPAD is quite picky when it comes to identifiers like /\.
> 
> This works with the attached program.
> 
> (3) -> foo("a","b")
> 
>    (3)  "a"
>                                                                  Type:
> String
> (4) -> "a" /\ "b"
> 
>    (4)  "a"
>                                                                  Type:
> String
> 
> But unfortunately in SPAD, I always have to escape /\. That's very
> uncomfortable and looks ugly in the code.
> 
> It's also not clear to me why I am unable to compile
> 
>   ((x: String) _/_\ (y: String)): String == x

Escaping means /\ is no longer treated as operator, so infix
syntax does not work.

> Would it be hard to recognize +, -, *, \/, /\, etc. in places like
> 
>   /\: (A, B) -> C

Not very hard, but would introduce ugly irregularity to syntax
(and parser).
 
> and
> 
>   a /\ b
> 
> without the need to escape them?

That was regression, due to changes in Spad scanner.  Fixed now.

> 
>    >> Apparent user error:
>    no modemap for /\ with 1 arguments
> 
> if I have chosen to compile the line
> 
>   foo(x: String, y: String): String == x _/_\ y

Escaped version is treated just as ordinary function...

-- 
                              Waldek Hebisch
[email protected] 

-- 
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.

Reply via email to