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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b50bc6538a649497 X-Google-Attributes: gid103376,public From: sb463ba@l1-hrz.uni-duisburg.de (Georg Bauhaus) Subject: Re: if statements Date: 2000/11/08 Message-ID: <8ucae4$l95$1@news-hrz.uni-duisburg.de>#1/1 X-Deja-AN: 691325067 References: <8tvbcq$8201@news.cis.okstate.edu> <8u505a$9ic1@news.cis.okstate.edu> <3A09A13F.CE7DF6EF@cepsz.unizar.es> Organization: Gerhard-Mercator-Universitaet - Gesamthochschule Duisburg Newsgroups: comp.lang.ada Date: 2000-11-08T00:00:00+00:00 List-Id: Alejandro Villanueva (190921@cepsz.unizar.es) wrote: : please, we are here to help other people... isn't it???? But how? I remember seeing a = a + 1 in a desk calculator's BASIC and I was desperate, because I could not see that this was not a declaration of equality, until I found out that "=" was actually ":=". Now if the problem had been "Swap"ping (like in this thread, partly), and I had not yet heard that you can't just exchange the values of two variables in some programming language, ie without a helper variable or one of the other ingenuities presented earlier in this thread, I think I would have found a reformulation of the problem that used more familiar 'objects' quite useful to gain an understanding. Something along: "If, late at night at some party, you mistakenly put the rest of the beer into a glass suitable for wine, and the rest of the wine into a glass suitable for beer, what can you do to exchange the fluids?" I can't say if this will actually help someone, but it might, i think, help their imagination; most people have two hands and can take up A and B in either and are quite ready to say, A :=: B; as is at least the x86. Isn't having to introduce additional memory or calculation part of the new unfamiliar way of thinking when programming, and isn't this much better explained with words (before formal training) than with T: = A; A:= B; B:= T; alone? I'm still thankful for exactly this happening on c.l.a with "more advanced" data structures and tricks. (And should I add that I do not think that John English doesn't explain?)