From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1d321b3a6b8bcab2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-01-29 00:45:23 PST Path: swrinde!howland.reston.ans.net!pipex!sunic!news.uni-c.dk!nbivax.nbi.dk!meyer.fys.ku.dk!sparre Newsgroups: comp.lang.ada Subject: Increment operator (+=) Message-ID: <1995Jan28.212345.2262@nbivax.nbi.dk> From: sparre@meyer.fys.ku.dk (Jacob Sparre Andersen) Date: 28 Jan 95 21:23:45 +0100 References: <3etund$hnr@miranda.gmrc.gecm.com> <3f4mbe$rud@cronkite.seas.gwu.edu> <3g9nir$fpl@gnat.cs.nyu.edu> Nntp-Posting-Host: meyer.fys.ku.dk X-Newsreader: TIN [version 1.2 PL2]Lines: 40 Date: 1995-01-28T21:23:45+01:00 List-Id: Robert Dewar (dewar@cs.nyu.edu) wrote the most recent article I have read in the thread about the operator "+=" in C. In two still not mentioned languages (dialects) there are these solutions to the 'problem': In COMAL (BASIC like) there are ":+" and ":-" incrementing and decrementing 'assignments'. antal_sider:+1 rest:-1 In Borland's Pascal dialect the system library contains these procedures: Inc(var SomeInteger : ; Step : ) ; Dec(var SomeInteger : ; Step : ) ; I think the last solution is the right way to do it in Ada. But it's only really usefull, if any type with "+" and "-" operators can 'inherit' the procedures (I don't think that's how Ada 95 works). The Borland way (tm :-) is just how we should code. No Ada 96 :-) -- I like the idea about using local renames. -- "add 1 to long-complex-name" - What a nice readable piece of code. What's wrong with this language? :-) Regards, Jacob Sparre Andersen -- A good movie? - What about three? - Kieslowskis 'White', 'Blue' and 'Red'! -- URL's: "mailto:sparre@nbi.dk", "http://meyer.fys.ku.dk/~sparre", "mailto:sparre+@pitt.edu" & "http://www.pitt.edu/~sparre". -- "We need a plan to diverge from", Fesser