Jensen's device

It was devised by Danish computer scientist Jørn Jensen, who worked with Peter Naur at Regnecentralen.[1][2][3] During his Turing Award speech, Naur mentions his work with Jensen on GIER ALGOL.Typically, ak will depend upon the changing (side-effected) k. For example, code to compute the sum of the first 100 terms of a real array V[] would be: During the execution of Sum, the actual argument i will increment during each step of the for loop, and each of the procedure's evaluations of ak will use the current value of i to access the successive array elements V[i].[7] A slight variation would be suitable for initiating a numerical integration of an expression by a method very similar to that of Sum.[9] Knuth says, "The use of 'macro' definition facilities to extend language, instead of relying solely on procedures for this purpose, results in a more satisfactory running program."If on the other hand the procedure were to be coded the other way around (with b being saved to temp instead of a) then the desired action would result, unless it were invoked as swap(A[i],i).
call by nameDanishJørn JensenPeter NaurRegnecentralenALGOL 60side effectsclosureCall stackDuff's deviceFunarg problemMan or boy testAssociation for Computing MachineryWayback MachineDijkstra, E. W.Communications of the ACMKnuth, D. E.ImplementationsTechnicalstandardsALGOL 58ALGOL 68DialectsALGOL 68CALGOL 68-RALGOL 68RSALGOL 68SALGOL NALGOL WALGOL XAtlas AutocodeEdinburgh IMPDartmouth ALGOL 30Elliott ALGOLExecutive Systems Problem Oriented LanguageJOVIALKidsgroveNELIACS-algolPS-algolNapier88SimulaFormalismsVan Wijngaarden grammarCommunityProfessionalassociationsBSI GroupEuro-Asian Council for Standardization, Metrology and CertificationInternational Federation for Information ProcessingIFIP Working Group 2.1Society of Applied Mathematics and MechanicsBurroughs CorporationElliott BrothersCase Institute of TechnologyUniversity of EdinburghUniversity of St AndrewsManchester UniversityMassachusetts Institute of TechnologyRoyal Radar EstablishmentJohn BackusFriedrich L. BauerHermann BottenbruchCharles KatzAlan PerlisHeinz RutishauserKlaus SamelsonJoseph Henry WegsteinBruce ArdenBernard GallerRobert M. GrahamRoland Carl BackhouseRichard BirdStephen R. BourneEdsger W. DijkstraAndrey ErshovRobert W. FloydJeremy GibbonsDavid GriesEric HehnerTony HoarePeter LandinTom MaibaumConor McBrideJohn McCarthyCarroll MorganMaurice NivatJohn E. L. PeckBrian RandellJacob T. SchwartzMicha SharirDavid TurnerBernard VauquoisEiiti WadaAdriaan van WijngaardenMike WoodgerOle-Johan DahlKristen NygaardSusan G. BondRobert DewarMichael GuyCornelis H. A. KosterCharles H. LindseyBarry J. MaillouxLambert MeertensWillem van der PoelDouglas T. RossMichel SintzoffNiklaus WirthPhilip WoodwardNobuo YonedaHal AbelsonJohn BarnesTony BrookerRon MorrisonPeter O'HearnJohn C. ReynoldsALGOL BulletinALGOL 68 to C++