File:  [CSRG BSD Unix] / 43BSDTahoe / ucb / pascal / tstpx / src / ffunc.p
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:58 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43tahoe
BSD 4.3tahoe

program forfunc( output );
    
    var
	x, z : integer;

    function foo : integer;
	begin
	    z := z + 1;
	    foo := z;
	end;

    function bar( function y : integer ; x : integer ) : integer;
	begin
	    bar := y;
	    writeln('in bar x = ', x:1);
	end;

    begin
	z := 1;
	x := bar (foo, foo);
        writeln('in forfunc bar = ', x:1);
    end.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.