Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.os.vms    |    DEC's VAX* line of computers & VMS.    |    264,096 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 262,229 of 264,096    |
|    =?UTF-8?Q?Arne_Vajh=C3=B8j?= to John Reagan    |
|    Re: Fun trick    |
|    08 Jan 25 16:32:41    |
   
   From: arne@vajhoej.dk   
      
   On 1/8/2025 3:42 PM, John Reagan wrote:   
   > And the compiler also supports the Extended Pascal TO BEGIN DO and TO   
   > END DO statements. TO BEGIN DO is just the same as [INITIALIZE] but   
   > allows any statement. TO END DO is an exit handler (registered with an   
   > initialization routine).   
      
   $ type prg.pas   
   program prg(input,output);   
      
   [external]   
   procedure say; external;   
      
   begin   
    writeln('2');   
    say;   
    writeln('4');   
   end.   
   $ type lib.pas   
   module lib(input, output);   
      
   [global]   
   procedure say;   
      
   begin   
    writeln('3');   
   end;   
      
   to begin do writeln('1');   
   to end do writeln('5');   
      
   end.   
   $ pas lib   
   $ link/share=libshr lib + sys$library:starlet/lib/incl=lib$initialize +   
   sys$input/opt   
   SYMBOL_VECTOR=(say=PROCEDURE)   
   $   
   $ define/nolog libshr sys$disk:[]libshr   
   $ pas prg   
   $ link prg + sys$input/opt   
   libshr/share   
   $   
   $ run prg   
   1   
   2   
   3   
   4   
   5   
      
   Arne   
      
   --- SoupGate-DOS v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca