Path: utzoo!mnetor!uunet!husc6!necntc!ima!haddock!karl From: karl@haddock.ISC.COM (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: min and max Message-ID: <2336@haddock.ISC.COM> Date: 20 Jan 88 02:16:16 GMT References: <11182@brl-adm.ARPA> <2197@haddock.ISC.COM> <518@cresswell.quintus.UUCP> <2254@haddock.ISC.COM> <515@viper.Lynx.MN.Org> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 21 In article <515@viper.Lynx.MN.Org> john@viper.UUCP (John Stanley) writes: >In article <2254@haddock.ISC.COM> karl@haddock.ima.isc.com (Karl Heuer) writes: > >[notes problems with backslashes in "/\" "\/" syntax] > >How about #< (numerical lesser) or #> (numerical greater) for min and max? >Last time I looked '#' wasn't being used for any C operator.... In ANSI C, it's used for certain preprocessor operators. It might be wise to reserve that character. How about "<|" and "|>" instead? (I'm assuming that my earlier suggestion ("><" and "<>") is too confusing.) > >What's the appropriate precedence for these operators? > >The logical place for a min/max operator would be after << >> >and just before the logical <, >, <=, >= operators. Certainly it should be above the relationals. It might be a good idea to avoid creating too many levels, though; perhaps it should have the same precedence as the shifts. Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint