langs a-z

This commit is contained in:
Ingy döt Net 2013-04-10 22:43:41 -07:00
parent db842d013d
commit d066446780
11389 changed files with 98361 additions and 1020 deletions

View file

@ -0,0 +1,12 @@
$ include "seed7_05.s7i";
enable_output(set of string);
const proc: main is func
local
var set of string: aSet is {"iron", "copper"};
begin
writeln(aSet);
incl(aSet, "silver");
writeln(aSet);
end func;

View file

@ -0,0 +1,17 @@
$ include "seed7_05.s7i";
const proc: main is func
local
var array string: anArray is [] ("iron", "copper");
var string: element is "";
begin
for element range anArray do
write(element <& " ");
end for;
writeln;
anArray &:= "silver";
for element range anArray do
write(element <& " ");
end for;
writeln;
end func;

View file

@ -0,0 +1,16 @@
$ include "seed7_05.s7i";
const type: aHashType is hash [string] string;
const proc: main is func
local
var aHashType: aHash is aHashType.value;
var string: aValue is "";
var string: aKey is "";
begin
aHash @:= ["gold"] "metal";
aHash @:= ["helium"] "noble gas";
for aValue key aKey range aHash do
writeln(aKey <& ": " <& aValue);
end for;
end func;