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=2.1 required=5.0 tests=BAYES_05,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!uunet!seismo!esosun!hyland From: hyland@esosun.UUCP (Steve Hyland) Newsgroups: comp.lang.ada Subject: Re: Dynamic Address Clauses?? Keywords: dynamic address change. Message-ID: <201@kvasir.esosun.UUCP> Date: 10 Jun 88 19:22:20 GMT References: <8806011944.AA06549@ti.com> <5140@nsc.nsc.com> <2817@geac.UUCP> <5151@nsc.nsc.com> Reply-To: hyland@kvasir.UUCP (Steve Hyland) Organization: Science Applications Internations Corp, San Diego List-Id: In article <5151@nsc.nsc.com> rfg@nsc.UUCP (Ron Guilmette) writes: >Regarding the use of: > > for P use at DYNAMIC; > >any value to use a dynamic address clause for a procedure. Just saying >that the procedure is at a different address than it was at link time >begs the question. Why is it at a different address? Under what circum- >stances whould it be useful for the procedure to be "at" a different >(program-specified) address? > Actually, I can think of an additional usage for this. In my X Toolkit, I will allow the programmer the flexibility of associating specific procedures, "Call Backs", to be executed whenever a toolkit widget such as a scroll bar is moved. The compiler will handle the association between the call back and the widget. However, there are situations where application USERS may wish to change these association dynamically, say by causing a different call back to be executed when the scroll bar is moved. Dynamic address clauses would allow me to associate a different call back in this way. I won't argue whether this is considered good or bad programming. Something this flexible should be used, albeit carefully. Steve Hyland