|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 20941 (0x51cd)
Types: TextFile
Notes: R1k Text-file segment
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦3683e1af8⟧
└─⟦this⟧
-- test attribute --
with text_io,attribute,field_identifier_array,objet,the_order,the_hero,the_place,
identifier,moving_string_array,group_array,complement,complement_array,
enumeration_array;
use text_io,attribute;
procedure test_attribute is
o : object;
ob : objet.object;
id : identifier.object;
index : natural;
ok : boolean;
begin
enumeration_array.put_literal(identifier.from_string("couleur"),
identifier.from_string("rouge"),ok);
enumeration_array.put_literal(identifier.from_string("couleur"),
identifier.from_string("jaune"),ok);
enumeration_array.put_literal(identifier.from_string("couleur"),
identifier.from_string("vert"),ok);
enumeration_array.put_literal(identifier.from_string("couleur"),
identifier.from_string("bleu"),ok);
enumeration_array.show;
field_identifier_array.put("vie",index,ok);
field_identifier_array.put("age",index,ok);
field_identifier_array.put("nom",index,ok);
field_identifier_array.put("couleur",index,ok);
field_identifier_array.put("description",index,ok);
field_identifier_array.show;
complement_array.put(complement.entity_object,identifier.from_string("gaston",ok);
complement_array.create_number_field(complement_array.index("gaston"),
field_identifier_array.index("age"),ok);
complement.put_field_number(complement_array.index("gaston"),
field_identifier_array.index("age"),13,ok);
complement_array.create_enumerate_field(complement_array.index("gaston"),
field_identifier_array.index("couleur"),ok);
index:=enumeration_array.enumeration("couleur");
complement.put_field_enumerate(complement_array.index("gaston"),
field_identifier_array.index("couleur"),
index,enumeration_array.literal(index,"rouge"),ok);
complement_array.put_verb(identifier.from_string("courir"),1);
complement_array.put_verb(identifier.from_string("aller"),1);
complement_array.put_word(identifier.from_string("de"));
complement_array.put_word(identifier.from_string("nord"));
complement_array.put(complement.place_object,identifier.from_string("cuisine"),ok);
complement_array.create_sentence_field(complement_array.index("cuisine"),
field_identifier_array.index("description"),ok);
complement.put_field_sentence(complement_array.index("cuisine"),
field_identifier_array.index("description"),
identifier.from_string("C'est une belle cuisine"),ok);
complement_array.put(complement.place_object,identifier.from_string("chambre"),ok);
complement_array.create_sentence_field(complement_array.index("chambre"),
field_identifier_array.index("description"),ok);
complement.put_field_sentence(complement_array.index("chambre"),
field_identifier_array.index("description"),
identifier.from_string("C'est une belle et grande chambre"),ok);
complement_array.put(complement.place_object,identifier.from_string("salon"),ok);
complement_array.create_sentence_field(complement_array.index("salon"),
field_identifier_array.index("description"),ok);
complement.put_field_sentence(complement_array.index("salon"),
field_identifier_array.index("description"),
identifier.from_string("C'est un grand salon"),ok);
complement_array.show;
identifier.put(id,"salle");
group_array.put(id,complement_array.index("chambre"),ok);
group_array.put(id,complement_array.index("salon"),ok);
group_array.put(id,complement_array.index("cuisine"),ok);
group_array.show
the_order.put_complement(moving_string.from("cuisine"),moving_string.from_string("aller"),
moving_string.from("nord"),
moving_string.from("de"),
moving_string.from("cuisine");
the_order.show;
the_hero.put(complement_identifier_array.index("gaston");
put_line("index the hero : " & natural'image(the_hero.index));
the_hero.show;
the_place.put(complement_identifier_array.index("salon");
put_line("index the place : " & natural'image(the_place.index));
the_place.show;
put_line("show vide");
show(o);
objet.create_real(ob,complement_identifier_array.index("gaston"));
put (o,ob,field_identifier_array.index("age"));
put_line("show plein");
show(o);
put_line("is a number : " & boolean'image(is_a_number(o)));
put_line("is a sentence : " & boolean'image(is_a_sentence(o)));
put_line("is an enumerate : " & boolean'image(is_an_enumerate(o)));
put_line("exist : " & boolean'image(exist(o)));
put_line("image " & image(o));
put_line("number : " & integer'image(number(o)));
put_line("sentence : " & sentence(o));
put_line("enumeration : " & natural'image(enumeration(o)));
put_line("literal : " & natural'image(literal(o)));
affect(o,34,ok);
put_line("affect number " & boolean'image(ok) & " " & integer'image(number(o))
& " " & image(o));
affect(o,enumeration_array.enumeration("rouge"),enumeration_array.literal("vert"),ok);
put_line("affect enumerate " & boolean'image(ok) & " " & natural'image(enumeration(o))
& " " & natural'image(literal(o)) & " " & image(o));
put_line("show apres changement");
show(o);
objet.create_group(ob,5);
put (o,ob,field_identifier_array.index("description"));
put_line("show plein");
show(o);
put_line("is a number : " & boolean'image(is_a_number(o)));
put_line("is a sentence : " & boolean'image(is_a_sentence(o)));
put_line("is an enumerate : " & boolean'image(is_an_enumerate(o)));
put_line("exist : " & boolean'image(exist(o)));
put_line("image " & image(o));
put_line("number : " & integer'image(number(o)));
put_line("sentence : " & sentence(o));
put_line("enumeration : " & natural'image(enumeration(o)));
put_line("literal : " & natural'image(literal(o)));
affect(o,34,ok);
put_line("affect number " & boolean'image(ok) & " " & integer'image(number(o))
& " " & image(o));
affect(o,enumeration_array.enumeration("rouge"),enumeration_array.literal("vert"),ok);
put_line("affect enumerate " & boolean'image(ok) & " " & natural'image(enumeration(o))
& " " & natural'image(literal(o)) & " " & image(o));
put_line("show apres changement");
show(o);
objet.create_hero(ob);
put (o,ob,field_identifier_array.index("couleur"));
put_line("show plein");
show(o);
put_line("is a number : " & boolean'image(is_a_number(o)));
put_line("is a sentence : " & boolean'image(is_a_sentence(o)));
put_line("is an enumerate : " & boolean'image(is_an_enumerate(o)));
put_line("exist : " & boolean'image(exist(o)));
put_line("image " & image(o));
put_line("number : " & integer'image(number(o)));
put_line("sentence : " & sentence(o));
put_line("enumeration : " & natural'image(enumeration(o)));
put_line("literal : " & natural'image(literal(o)));
affect(o,34,ok);
put_line("affect number " & boolean'image(ok) & " " & integer'image(number(o))
& " " & image(o));
affect(o,enumeration_array.enumeration("rouge"),enumeration_array.literal("vert"),ok);
put_line("affect enumerate " & boolean'image(ok) & " " & natural'image(enumeration(o))
& " " & natural'image(literal(o)) & " " & image(o));
put_line(show apres changement");
show(o);
objet.create_place(ob);
put (o,ob,field_identifier_array.index("description"));
put_line("show plein");
show(o);
put_line("is a number : " & boolean'image(is_a_number(o)));
put_line("is a sentence : " & boolean'image(is_a_sentence(o)));
put_line("is an enumerate : " & boolean'image(is_an_enumerate(o)));
put_line("exist : " & boolean'image(exist(o)));
put_line("image " & image(o));
put_line("number : " & integer'image(number(o)));
put_line("sentence : " & sentence(o));
put_line("enumeration : " & natural'image(enumeration(o)));
put_line("literal : " & natural'image(literal(o)));
affect(o,34,ok);
put_line("affect number " & boolean'image(ok) & " " & integer'image(number(o))
& " " & image(o));
affect(o,enumeration_array.enumeration("rouge"),enumeration_array.literal("vert"),ok);
put_line("affect enumerate " & boolean'image(ok) & " " & natural'image(enumeration(o))
& " " & natural'image(literal(o)) & " " & image(o));
put_line(show apres changement");
show(o);
complement_array.show;
end;
-- test view --
with text_io,test_viewview,attribute,field_identifier_array,objet,the_order,the_hero,
the_place,identifier,moving_string_array,group_array,complement,complement_array,
enumeration_array;
use text_io,view;
procedure test_view_list is
o : object;
a1,a2,a3,a4 ; attribute;
ob : objet.object;
id : identifier.object;
index : natural;
ok : boolean;
begin
enumeration_array.put_literal(identifier.from_string("couleur"),
identifier.from_string("rouge"),ok);
enumeration_array.put_literal(identifier.from_string("couleur"),
identifier.from_string("jaune"),ok);
enumeration_array.put_literal(identifier.from_string("couleur"),
identifier.from_string("vert"),ok);
enumeration_array.put_literal(identifier.from_string("couleur"),
identifier.from_string("bleu"),ok);
enumeration_array.show;
field_identifier_array.put("vie",index,ok);
field_identifier_array.put("age",index,ok);
field_identifier_array.put("nom",index,ok);
field_identifier_array.put("couleur",index,ok);
field_identifier_array.put("description",index,ok);
field_identifier_array.show;
complement_array.put(complement.entity_object,identifier.from_string("gaston",ok);
complement_array.put(complement.entity_object,identifier.from_string("table",ok);
complement_array.put_verb(identifier.from_string("courir"),1);
complement_array.put_verb(identifier.from_string("aller"),1);
complement_array.put_word(identifier.from_string("de"));
complement_array.put_word(identifier.from_string("nord"));
complement_array.put_word(identifier.from_string("est"));
complement_array.put_word(identifier.from_string("sud"));
complement_array.put_word(identifier.from_string("ouest"));
complement_array.put_word(identifier.from_string("porte"));
complement_array.put_word(identifier.from_string("trou"));
complement_array.put(complement.place_object,identifier.from_string("cuisine"),ok);
complement_array.put(complement.place_object,identifier.from_string("chambre"),ok);
complement_array.put(complement.place_object,identifier.from_string("salon"),ok);
complement_array.create_number_field(complement_array.index("gaston"),
field_identifier_array.index("age"),ok);
complement.put_field_number(complement_array.index("gaston"),
field_identifier_array.index("age"),13,ok);
complement_array.create_enumerate_field(complement_array.index("gaston"),
field_identifier_array.index("couleur"),ok);
index:=enumeration_array.enumeration("couleur");
complement.put_field_enumerate(complement_array.index("gaston"),
field_identifier_array.index("couleur"),
index,enumeration_array.literal(index,"rouge"),ok);
complement_array.put_place(complement_array.index("gaston"),
complement_array.index("cuisine",ok);
complement_array.put_place(complement_array.index("table"),
complement_array.index("cuisine",ok);
complement_array.create_sentence_field(complement_array.index("cuisine"),
field_identifier_array.index("description"),ok);
complement.put_field_sentence(complement_array.index("cuisine"),
field_identifier_array.index("description"),
identifier.from_string("C'est une belle cuisine"),ok);
complement_array.put_link(
complement_array.put_exit(complement_array.index("cuisine"),
complement_array.index("porte"),
complement_array.index("cuisine"),
complement_array.index("nord"),
complement_array.index("chambre"),
complement_array.index("sud"),ok);
complement_array.put_exit(complement_array.index("cuisine"),
complement_array.index("trou"),
complement_array.index("cuisine"),
complement_array.index("ouest"),
complement_array.index("salon"),
complement_array.index("est"),ok);
complement_array.create_sentence_field(complement_array.index("chambre"),
field_identifier_array.index("description"),ok);
complement.put_field_sentence(complement_array.index("chambre"),
field_identifier_array.index("description"),
identifier.from_string("C'est une belle et grande chambre"),ok);
complement_array.put_exit(complement_array.index("chambre"),
complement_array.index("porte"),
complement_array.index("chambre"),
complement_array.index("sud"),
complement_array.index("cuisine"),
complement_array.index("nord"),ok);
complement_array.create_sentence_field(complement_array.index("salon"),
field_identifier_array.index("description"),ok);
complement.put_field_sentence(complement_array.index("salon"),
field_identifier_array.index("description"),
identifier.from_string("C'est un grand salon"),ok);
complement_array.show;
complement_array.put_exit(complement_array.index("salon"),
complement_array.index("trou"),
complement_array.index("salon"),
complement_array.index("est"),
complement_array.index("cuisine"),
complement_array.index("ouest"),ok);
identifier.put(id,"salle");
group_array.put(id,complement_array.index("chambre"),ok);
group_array.put(id,complement_array.index("salon"),ok);
group_array.put(id,complement_array.index("cuisine"),ok);
group_array.show
the_order.put_complement(moving_string.from("cuisine"),moving_string.from_string("aller"),
moving_string.from("nord"),
moving_string.from("de"),
moving_string.from("cuisine");
the_order.show;
the_hero.put(complement_identifier_array.index("gaston");
put_line("index the hero : " & natural'image(the_hero.index));
the_hero.show;
the_place.put(complement_identifier_array.index("cuisine");
put_line("index the place : " & natural'image(the_place.index));
the_place.show;
objet.create_real(ob,complement_identifier_array.index("gaston"));
attribute.put (a1,ob,field_identifier_array.index("age"));
attribute.show(a1);
objet.create_group(ob,5);
attribute.put (a2,ob,field_identifier_array.index("description"));
attribute.show(a2);
objet.create_hero(ob);
attribute.put (a3,ob,field_identifier_array.index("couleur"));
attribute.show(a3);
objet.create_place(ob);
attribute.put (a4,ob,field_identifier_array.index("description"));
attribute.show(a4);
put_line("show vide");
show(l);
put_line("display vide");
display(l);
create_sentence(o,identifier.from_string("Ca marche !!!"));
display(o);
show(o);
create_number(o,2345);
display(o);
show(o);
create_attribute(o,a1);
display(o);
show(o);
create_attribute(o,a2);
display(o);
show(o);
create_attribute(o,a3);
display(o);
show(o);
create_attribute(o,a4);
display(o);
show(o);
create_exit(o,complement_array.index("nord"));
display(o);
show(o);
create_exits(o);
display(o);
show(o);
objet.create_real(ob,complement_identifier_array.index("cuisine"));
create_contents(o,ob);
display(o);
show(o);
end;
-- test view_list --
with text_io,view,attribute,field_identifier_array,objet,the_order,the_hero,the_place,
identifier,moving_string_array,group_array,complement,complement_array,
enumeration_array;
use text_io,view;
procedure test_view is
l,l1 : object;
o : view.object;
a1,a2,a3,a4 ; attribute;
ob : objet.object;
id : identifier.object;
index : natural;
ok : boolean;
begin
enumeration_array.put_literal(identifier.from_string("couleur"),
identifier.from_string("rouge"),ok);
enumeration_array.put_literal(identifier.from_string("couleur"),
identifier.from_string("jaune"),ok);
enumeration_array.put_literal(identifier.from_string("couleur"),
identifier.from_string("vert"),ok);
enumeration_array.put_literal(identifier.from_string("couleur"),
identifier.from_string("bleu"),ok);
enumeration_array.show;
field_identifier_array.put("vie",index,ok);
field_identifier_array.put("age",index,ok);
field_identifier_array.put("nom",index,ok);
field_identifier_array.put("couleur",index,ok);
field_identifier_array.put("description",index,ok);
field_identifier_array.show;
complement_array.put(complement.entity_object,identifier.from_string("gaston",ok);
complement_array.put(complement.entity_object,identifier.from_string("table",ok);
complement_array.put_verb(identifier.from_string("courir"),1);
complement_array.put_verb(identifier.from_string("aller"),1);
complement_array.put_word(identifier.from_string("de"));
complement_array.put_word(identifier.from_string("nord"));
complement_array.put_word(identifier.from_string("est"));
complement_array.put_word(identifier.from_string("sud"));
complement_array.put_word(identifier.from_string("ouest"));
complement_array.put_word(identifier.from_string("porte"));
complement_array.put_word(identifier.from_string("trou"));
complement_array.put(complement.place_object,identifier.from_string("cuisine"),ok);
complement_array.put(complement.place_object,identifier.from_string("chambre"),ok);
complement_array.put(complement.place_object,identifier.from_string("salon"),ok);
complement_array.create_number_field(complement_array.index("gaston"),
field_identifier_array.index("age"),ok);
complement.put_field_number(complement_array.index("gaston"),
field_identifier_array.index("age"),13,ok);
complement_array.create_enumerate_field(complement_array.index("gaston"),
field_identifier_array.index("couleur"),ok);
index:=enumeration_array.enumeration("couleur");
complement.put_field_enumerate(complement_array.index("gaston"),
field_identifier_array.index("couleur"),
index,enumeration_array.literal(index,"rouge"),ok);
complement_array.put_place(complement_array.index("gaston"),
complement_array.index("cuisine",ok);
complement_array.put_place(complement_array.index("table"),
complement_array.index("cuisine",ok);
complement_array.create_sentence_field(complement_array.index("cuisine"),
field_identifier_array.index("description"),ok);
complement.put_field_sentence(complement_array.index("cuisine"),
field_identifier_array.index("description"),
identifier.from_string("C'est une belle cuisine"),ok);
complement_array.put_link(
complement_array.put_exit(complement_array.index("cuisine"),
complement_array.index("porte"),
complement_array.index("cuisine"),
complement_array.index("nord"),
complement_array.index("chambre"),
complement_array.index("sud"),ok);
complement_array.put_exit(complement_array.index("cuisine"),
complement_array.index("trou"),
complement_array.index("cuisine"),
complement_array.index("ouest"),
complement_array.index("salon"),
complement_array.index("est"),ok);
complement_array.create_sentence_field(complement_array.index("chambre"),
field_identifier_array.index("description"),ok);
complement.put_field_sentence(complement_array.index("chambre"),
field_identifier_array.index("description"),
identifier.from_string("C'est une belle et grande chambre"),ok);
complement_array.put_exit(complement_array.index("chambre"),
complement_array.index("porte"),
complement_array.index("chambre"),
complement_array.index("sud"),
complement_array.index("cuisine"),
complement_array.index("nord"),ok);
complement_array.create_sentence_field(complement_array.index("salon"),
field_identifier_array.index("description"),ok);
complement.put_field_sentence(complement_array.index("salon"),
field_identifier_array.index("description"),
identifier.from_string("C'est un grand salon"),ok);
complement_array.show;
complement_array.put_exit(complement_array.index("salon"),
complement_array.index("trou"),
complement_array.index("salon"),
complement_array.index("est"),
complement_array.index("cuisine"),
complement_array.index("ouest"),ok);
identifier.put(id,"salle");
group_array.put(id,complement_array.index("chambre"),ok);
group_array.put(id,complement_array.index("salon"),ok);
group_array.put(id,complement_array.index("cuisine"),ok);
group_array.show
the_order.put_complement(moving_string.from("cuisine"),moving_string.from_string("aller"),
moving_string.from("nord"),
moving_string.from("de"),
moving_string.from("cuisine");
the_order.show;
the_hero.put(complement_identifier_array.index("gaston");
put_line("index the hero : " & natural'image(the_hero.index));
the_hero.show;
the_place.put(complement_identifier_array.index("cuisine");
put_line("index the place : " & natural'image(the_place.index));
the_place.show;
objet.create_real(ob,complement_identifier_array.index("gaston"));
attribute.put (a1,ob,field_identifier_array.index("age"));
attribute.show(a1);
objet.create_group(ob,5);
attribute.put (a2,ob,field_identifier_array.index("description"));
attribute.show(a2);
objet.create_hero(ob);
attribute.put (a3,ob,field_identifier_array.index("couleur"));
attribute.show(a3);
objet.create_place(ob);
attribute.put (a4,ob,field_identifier_array.index("description"));
attribute.show(a4);
put_line("show vide");
show;
put_line("display vide");
display;
view.create_sentence(o,identifier.from_string("Ca marche !!!"));
view.display(o);
view.show(o);
put(l,o);
view.create_number(o,2345);
view.display(o);
view.show(o);
put(l,o);
view.create_attribute(o,a1);
view.display(o);
view.show(o);
put(l,o);
view.create_attribute(o,a2);
view.display(o);
view.show(o);
put(l,o);
view.create_attribute(o,a3);
view.display(o);
view.show(o);
put(l,o);
view.create_attribute(o,a4);
view.display(o);
view.show(o);
put(l,o);
view.create_exit(o,complement_array.index("nord"));
view.display(o);
view.show(o);
put(l,o);
view.create_exits(o);
view.display(o);
view.show(o);
put(l,o);
objet.create_real(ob,complement_identifier_array.index("cuisine"));
view.create_contents(o,ob);
view.display(o);
view.show(o);
put(l,o);
put_line("show plein");
show(l);
put_line("display plein");
display(l);
put_line("show l1 vide");
show(l1);
copy (l,l1);
put_line("show l1 vide");
show(l1);
put_line("show apres free");
free(l);
show(l);
end;