Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,7 @@
% declare some variables %
integer a1, a2; real b; long real c; complex d; long complex f;
logical g; bits h; string(32) j;
% assign "initial values" %
f := d := c := b := a2 := a1 := 0; % multiple assignment %
g := false; h := #a0; j := "Hello, World!";

View file

@ -0,0 +1,2 @@
record R1 ( integer length; string(256) text );
reference(R1) ref1, ref2;

View file

@ -0,0 +1,3 @@
record person( string(32) name; integer age );
record date( integer day, month, year );
reference(person, date) ref3;

View file

@ -0,0 +1 @@
reference(integer) refInt; % an illegal declaration %

View file

@ -0,0 +1,2 @@
record INT_VALUE ( integer val );
reference(INT_VALUE) refInt;

View file

@ -0,0 +1,7 @@
% using the person record defined above...%
reference (person) someone;
someone := person % create a new person structure with uninitialised fields %
name(someone) := "Fred"; % initialise the fields %
age(someone) := 27;
% could also initialise the fields when the record is created: %
someone := person( "Harry", 32 );