Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!sci.ccny.cuny.edu!phri!roy From: roy@phri.nyu.edu (Roy Smith) Newsgroups: comp.sys.mac.programmer Subject: Re: Pascal deficiency? Message-ID: <1990Dec17.160242.5095@phri.nyu.edu> Date: 17 Dec 90 16:02:42 GMT References: Sender: news@phri.nyu.edu (News System) Organization: Public Health Research Institute, New York City Lines: 24 aberno@questor.wimsey.bc.ca (Anthony Berno) writes: > Either there is no way to do a quick increment in Pascal, or I'm missing > something in my knowledge, or I'm wrong about the speed difference between > things like ++(variable) and (variable):=(variable)+1 I've never written a single line of pascal in my life, but in C, x++ and x = x + 1 are absolutely and completely identical (as is x += 1). Any decent compiler should generate exactly the same code for all three. The ++ and -- operators are just syntactic sugar. I'm not a language lawyer, so I won't stick my head out about things like foo[bar(foo[i])]++ vs. foo[bar(foo[i])] = foo[bar(foo[i])] + 1 but for incrementing simple variables, it makes no difference. There are lots of good reasons not to like Pascal, but this isn't one of them. -- Roy Smith, Public Health Research Institute 455 First Avenue, New York, NY 10016 roy@alanine.phri.nyu.edu -OR- {att,cmcl2,rutgers,hombre}!phri!roy "Arcane? Did you say arcane? It wouldn't be Unix if it wasn't arcane!"