File:  [CSRG BSD Unix] / 43BSD / ucb / dbx / tests / mod / dynarrays.mod
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:55 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43
BSD 4.3

module main;
type
    Color = (RED, BLUE, GREEN);
var
    a : dynarray of array of integer;
    i, j : integer;

procedure p (i : integer; var a : array of array of integer; j : integer);
begin
    a[3, 1] := i;
    a[4, 2] := j;
end p;

begin
    new(a, 10, 5);
    for i := 0 to 9 do
	for j := 0 to 4 do
	    a^[i, j] := i;
	end;
    end;
    p(4, a^, 5);
end main.

unix.superglobalmegacorp.com

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