Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Associativity precedence for the user-defined operator.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: John Prevost <j.prevost@g...>
Subject: Re: [Caml-list] Associativity precedence for the user-defined operator.
In general, the associativity and precedence of an operator (unless
you go out to camlp4 or something) is based on the operator's first
character.  For example +/ would act like +, */ would act like *, and
so on.  For this reason, you'll often see O'Caml operators defined as
"basic operator followed by some strange symbol."  In your add_num
case, +/ and friends would probably mesh well.  Then you also get the
expected interaction when mixing +/ and */.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: