From: CSBVAX::CSBVAX::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 23-MAR-1989 00:53 To: MRGATE::"ARISIA::EVERHART" Subj: Re: Using $DCLEXH from Pascal Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Wed, 22 MAR 89 21:31:19 PDT Received: from CUNYVM.CUNY.EDU by KL.SRI.COM with TCP; Wed, 22 Mar 89 21:21:30 PST Received: from UCLACH.BITNET by CUNYVM.CUNY.EDU (IBM VM SMTP R1.1) with BSMTP id 4038; Wed, 22 Mar 89 23:56:44 EST Date: Wed, 22 Mar 89 20:41 PDT From: Subject: Re: Using $DCLEXH from Pascal To: INFO-VAX@KL.SRI.COM X-Original-To: INFO-VAX@KL.SRI.COM, WILKINSON Before I answer a question, can anyone explain how to post to the entire list? When I send to INFO-VAX@KL.SRI.COM, I never see whatever I send again (and I assume other BITNETers don't either). When I send to INFO-VAX@MARIST, the BITNET sites receive the posting, but the rest of the world doesn't. What am I missing? Anyhow... Marc Schenk (MSCHENK@CLSUNI51.BITNET) asks: I am trying to write PASCAL program which includes an exit handler. Would anyone be kind enough to send me a small example including ... ... the sys$dclexh function declaration ... the declaration of the procedure implementing the exit handler ... the exit_handler_block declaration and initialization ... the call to sys$dclexh What follows shows enough to get you going. It isn't completely general with respect to parameter passing, but will probably do for most instances. (**) Program Whatever; (* Declaring an exit handler in VAX Pascal *) Type Descriptor_Block = Record Forward_Link : [Pos (0)] Unsigned; Exit_Handler_Address : [Pos (32)] Unsigned; Argument_Count : [Pos (64)] Unsigned_Byte; Condition_Address : [Pos (96)] ^Unsigned; End; Var Exit_Descriptor : [Static] Descriptor_Block; (* The Exit Handler *) [Asynchronous, Unbound] Function Game_Over (Condition : Unsigned) : Unsigned; Begin . . . End; (* The Exit Handler *) Begin (*MAIN*) . . . (* Declare Exit Handler *) Exit_Descriptor := Zero; Exit_Descriptor.Exit_Handler_Address := IAddress (Game_Over); New (Exit_Descriptor.Condition_Address); Stat := $DCLEXH (DesBlk := Exit_Descriptor); If Not Odd (Stat) Then $EXIT (Stat); . . . End. (*MAIN*) (**) ;+ James Wilkinson Phone: 1-213-206-5104 Department of Chemistry and Biochemistry University of California, Los Angeles BITNET: WILKINSON@UCLACH 405 Hilgard Avenue Internet: WILKINSON@UCLACH.CHEM.UCLA.EDU Los Angeles, California 90024-1569 HEPnet/SPAN: ABBY::JAMES or 5882::JAMES ;-