Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!hsdndev!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: cond. op. on ='s LHS Message-ID: <15238@smoke.brl.mil> Date: 19 Feb 91 01:42:40 GMT References: <1196@sheol.UUCP> <331@smds.UUCP> <5672:Feb1814:26:0291@kramden.acf.nyu.edu> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 12 In article <5672:Feb1814:26:0291@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >> There really is a need for >> conditional expressions. >This can be argued. ?: is almost purely syntactic; ... Yes, but then so is the provision of a multiplicity of ways of expressing looping. I seldom have occasion to assign the same value to alternative variables, as in the example that started this thread, but often I need to assign alternative values to a given variable, or return alternative values from a function. Often it is both convenient and clear to use a ?: expression rather than cast the code into the form of an "if" statement.