Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!samsung!crackers!m2c!umvlsi!dime!sandy From: sandy@snoopy.cs.umass.edu (& Wise) Newsgroups: comp.sys.mac.programmer Subject: Re: Pascal deficiency? Message-ID: Date: 18 Dec 90 14:59:30 GMT References: Sender: news@dime.cs.umass.edu Organization: Organization? I thought entropy would take care of that... Lines: 25 In-reply-to: aberno@questor.wimsey.bc.ca's message of 17 Dec 90 04:57:37 GMT > Either there is no way to do a quick increment in Pascal ... Pascal does not have an increment operator. Wirth acknowledged this problem with the design of Modula-2 when he added the forms: INC ( variable ); DEC ( variable ); However, I think Pascal will let you can use the successor function. This doesn't eliminate the assignment, but does explicitly request the increment: variable := SUCC ( variable ); > ... or I'm missing something in my knowledge, or I'm wrong about the >speed difference between things like > ++(variable) and > (variable):=(variable)+1 The speed difference between the two depends on the quality of the optimizations, and context (e.g., in a FOR loop, Pascal's implicit increment can usually be done as part of the test and branch instruction, while in C the increment is an explicit statement, and the optimizer must catch it). -- Alexander Erskine Wise /\/\/\/\/\/\/\/\/\/\/\/\ Software Development Laboratory /\/\/\/\/\/\/\/\/\/\/\/\/\/\ WISE@CS.UMASS.EDU /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\ This situation calls for large amounts of unadulterated CHOCOLATE! /\/\/\