* [Caml-list] Limits on operator-style function names?
@ 2003-11-17 15:42 Richard Jones
2003-11-17 15:55 ` Falk Hueffner
0 siblings, 1 reply; 2+ messages in thread
From: Richard Jones @ 2003-11-17 15:42 UTC (permalink / raw)
To: caml-list
I'm trying to find out what the limits are on the names of operator
functions (ie. val ( := ) : ...)
I have found through experimentation that the following are valid:
!
!!
!*
*:=
and these are invalid:
:*=
:=*
In particular I wanted a function called ( :=* ) but that doesn't seem
to be allowed.
What are the rules for this?
Rich.
--
Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
MAKE+ is a sane replacement for GNU autoconf/automake. One script compiles,
RPMs, pkgs etc. Linux, BSD, Solaris. http://www.annexia.org/freeware/makeplus/
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] Limits on operator-style function names?
2003-11-17 15:42 [Caml-list] Limits on operator-style function names? Richard Jones
@ 2003-11-17 15:55 ` Falk Hueffner
0 siblings, 0 replies; 2+ messages in thread
From: Falk Hueffner @ 2003-11-17 15:55 UTC (permalink / raw)
To: caml-list
Richard Jones <rich@annexia.org> writes:
> I'm trying to find out what the limits are on the names of operator
> functions (ie. val ( := ) : ...)
>
> What are the rules for this?
see the manual, 6.1 Lexical conventions
infix-symbol ::= (= | < | > | @ | ^ | | | & | + | - | * | / | $ | %) { operator-char }
prefix-symbol ::= (! | ? | ~) { operator-char }
operator-char ::= ! | $ | % | & | * | + | - | . | / | : | < | = | > | ? | @ | ^ | | | ~
i.e., the first char determines the arity, and then you can freely
append random letters.
--
Falk
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-11-17 15:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-17 15:42 [Caml-list] Limits on operator-style function names? Richard Jones
2003-11-17 15:55 ` Falk Hueffner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox