[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Pierre Weis <Pierre.Weis@i...> |
| Subject: | Re: ocaml prefix syntax |
> CAML allows me to define the following prefix identifier: > > let prefix !~ = .... > > Objective CAML documentation says it allows ! (and ? and ~) as prefix > operators, too, but I get "Characters 11-13: Syntax error" when I try. > How do I use prefix characters in OCAML? > > Trent > > (Apologies for no French.) You should enclose your infix operator into parens, instead of using the prefix keyword: # let (!~) x = x + 1;; val !~ : int -> int = <fun> Pierre Weis INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/