Skip to content

Commit 40e8f9e

Browse files
committed
Seed7 release 2006-01-11
1 parent de11c06 commit 40e8f9e

74 files changed

Lines changed: 1149 additions & 462 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

doc/contact.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Seed7 contact information
2+
3+
Homepage: http://seed7.sourceforge.net
4+
Wikipedia: http://en.wikipedia.org/wiki/Seed7
5+
Project page: http://sourceforge.net/projects/seed7
6+
7+
Email address: thomas.mertes@gmx.at
8+
9+
Please mention Seed7 in the subject to distinguish your mail from spam.

doc/manual.htm

Lines changed: 53 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@
108108
<li><!-- 13.2 --><a href="#Exceptions"><b>Exceptions</b></a></li>
109109
<li><!-- 13.3 --><a href="#Handlers"><b>Handlers</b></a></li>
110110
<li><!-- 13.4 --><a href="#Other_errors_and_warnings"><b>Other errors and warnings</b></a></li></ol>
111-
</ol></p>
111+
</ol></p><hr>
112112

113-
<hr><p></p>
113+
<p></p>
114114
<a name="INTRODUCTION"><big><b>1. INTRODUCTION</b></big></a>
115115
<!-- =============== -->
116116
<p></p>
@@ -184,24 +184,26 @@
184184
<p>
185185
Seed7 has the following features
186186
</p><ul>
187-
<li><!-- - -->It is object oriented</li>
187+
<li><!-- - -->User defined statements and operators.</li>
188188

189-
<li><!-- - -->User defined statements and operators</li>
189+
<li><!-- - -->Types are first class objects and therefore templates and
190+
generics can be defined easily without special syntax.</li>
190191

191-
<li><!-- - -->exception handling</li>
192+
<li><!-- - -->Predefined constructs like arrays or for-loops are
193+
declared in the language itself.</li>
192194

193-
<li><!-- - -->overloading of procedures/functions/operators/statements</li>
195+
<li><!-- - -->Object orientation is used where it brings advantages and
196+
not in places where other solutions are more obvious.</li>
194197

195-
<li><!-- - -->templates/generics (in the form of functions with
196-
type results and type parameters)</li>
198+
<li><!-- - -->Strong typing</li>
197199

198-
<li><!-- - -->Resizable arrays</li>
200+
<li><!-- - -->exception handling</li>
199201

200-
<li><!-- - -->Bitsets</li>
202+
<li><!-- - -->overloading of procedures/functions/operators/statements</li>
201203

202-
<li><!-- - -->Strong typing</li>
204+
<li><!-- - -->Various predefined types like resizable arrays, hashes,
205+
bitsets, structs, etc.</li>
203206
</ul><p>
204-
205207
But a new programming language differs not only from existing
206208
ones by new features. The real advantage comes from omitting
207209
features which are outdated.
@@ -323,9 +325,9 @@
323325
and chapter 4 contains various examples of syntax and semantic
324326
declarations. The primary parts of the syntax are described in
325327
the chapters 9 and 10.
326-
</p>
328+
</p><hr>
327329

328-
<hr><p></p>
330+
<p></p>
329331
<a name="TUTORIAL"><big><b>2. TUTORIAL</b></big></a>
330332
<!-- =========== -->
331333
<p>
@@ -371,16 +373,13 @@
371373
<font color=blue>begin</font>
372374
writeln(<font color=maroon>"hello world"</font>);
373375
<font color=blue>end func</font>;
374-
375-
$ <font color=blue>system</font> <font color=maroon>"main"</font> is main;
376376
</pre><p>
377377
The first line includes all definitions of the standard
378378
library. In contrast to other standard libraries the seed7_05.s7i
379379
library contains not only function declarations but also
380380
declarations of statements and operators.
381-
</p><p>
382-
The last line specifies that in this program the object
383-
<tt>'main'</tt> should be executed.
381+
Additionally the seed7_05.s7i library defines the '<tt>main</tt>' function
382+
as entry point for a Seed7 program.
384383
</p><p>
385384
If you write this program in a file called hello.sd7
386385
and execute the command
@@ -433,8 +432,6 @@
433432
fahr := fahr + increment;
434433
<font color=blue>end while</font>;
435434
<font color=blue>end func</font>;
436-
437-
$ <font color=blue>system</font> <font color=maroon>"main"</font> <font color=blue>is</font> main;
438435
</pre><p>
439436
Everything between <font color=green>(* and *)</font> is a comment which is ignored.
440437
This program contains local constants and variables of the
@@ -487,8 +484,6 @@
487484
writeln(fahr <font color=blue>lpad</font> 3 <& <font color=maroon>" "</font> <& celsius <font color=blue>digits</font> 2 <font color=blue>lpad</font> 6);
488485
<font color=blue>end for</font>;
489486
<font color=blue>end func</font>;
490-
491-
$ <font color=blue>system</font> <font color=maroon>"main"</font> <font color=blue>is</font> main;
492487
</pre><p>
493488
To use the type <tt>'<font color=red>float</font>'</tt> it is necessary to include
494489
<tt><font color=maroon>"float.s7i"</font></tt>. The <tt>'<font color=red>float</font>'</tt> variable <tt>'celsius'</tt> must be
@@ -653,8 +648,6 @@
653648
<font color=blue>end for</font>;
654649
writeln;
655650
<font color=blue>end func</font>;
656-
657-
$ <font color=blue>system</font> <font color=maroon>"main"</font> <font color=blue>is</font> main;
658651
</pre><p>
659652
The <tt>'<font color=blue>for</font>'</tt> statement iterates over <tt>'argv(PROGRAM)'</tt>.
660653
The <tt>'argv(PROGRAM)'</tt> function returns an <tt>'<font color=red>array string</font>'</tt>
@@ -691,13 +684,13 @@
691684
<font color=blue>const</font> <font color=red>proc</font>: FOR_DECLS (<font color=blue>in</font> <font color=red>type</font>: aType) <font color=blue>is func</font>
692685
<font color=blue>begin</font>
693686

694-
<font color=blue>const</font> <font color=red>proc</font>: for (<font color=blue>inout</font> <font color=red>aType</font>: variable) range (<font color=blue>in</font> <font color=red>aType</font>: lower_limit) to (<font color=blue>in</font> <font color=red>aType</font>: upper_limit) do
687+
<font color=blue>const</font> <font color=red>proc</font>: for (<font color=blue>inout</font> <font color=red>aType</font>: variable) range (<font color=blue>in</font> <font color=red>aType</font>: low) to (<font color=blue>in</font> <font color=red>aType</font>: high) do
695688
(<font color=blue>in</font> <font color=red>proc</font>: statements) end for <font color=blue>is func</font>
696689
<font color=blue>begin</font>
697-
variable := lower_limit;
698-
<font color=blue>if</font> variable <= upper_limit <font color=blue>then</font>
690+
variable := low;
691+
<font color=blue>if</font> variable <= high <font color=blue>then</font>
699692
statements;
700-
<font color=blue>while</font> variable < upper_limit <font color=blue>do</font>
693+
<font color=blue>while</font> variable < high <font color=blue>do</font>
701694
incr(variable);
702695
statements;
703696
<font color=blue>end while</font>;
@@ -714,8 +707,9 @@
714707
<font color=red>char</font> and <font color=red>boolean</font> as parameter creates corresponding declarations
715708
of <tt>'<font color=blue>for</font>'</tt> statements. The example above is a simplified part of
716709
the standard Seed7 library <font color=maroon>"seed7_05.s7i"</font>.
710+
</p><hr>
717711

718-
<hr><p></p>
712+
<p></p>
719713
<a name="SYNTAX"><big><b>3. SYNTAX</b></big></a>
720714
<!-- ========= -->
721715
<p>
@@ -922,9 +916,9 @@
922916
Note that the second line of syntax description is different
923917
to the syntax description of the previous example. The 'else'
924918
is taken out to form an expression of its own.
925-
</p>
919+
</p><hr>
926920

927-
<hr><p></p>
921+
<p></p>
928922
<a name="PREDEFINED_STATEMENTS"><big><b>4. PREDEFINED STATEMENTS</b></big></a>
929923
<!-- ======================== -->
930924
<p>
@@ -1412,9 +1406,9 @@
14121406

14131407
CASE_DECLS(<font color=red>integer</font>);
14141408
CASE_DECLS(<font color=red>char</font>);
1415-
</pre><p></p>
1409+
</pre><p></p><hr>
14161410

1417-
<hr><p></p>
1411+
<p></p>
14181412
<a name="PREDEFINED_TYPES"><big><b>5. PREDEFINED TYPES</b></big></a>
14191413
<!-- =================== -->
14201414
<p>
@@ -2674,9 +2668,9 @@
26742668
Functions:
26752669
WRITE_EXPR(A)
26762670
Write expr A to FILE OUT
2677-
</pre><p></p>
2671+
</pre><p></p><hr>
26782672

2679-
<hr><p></p>
2673+
<p></p>
26802674
<a name="PARAMETERS"><big><b>6. PARAMETERS</b></big></a>
26812675
<!-- ============= -->
26822676
<p>
@@ -3000,9 +2994,9 @@
30002994
</p><pre>
30012995
symbol_parameter ::=
30022996
name_identifier | special_identifier .
3003-
</pre><p></p>
2997+
</pre><p></p><hr>
30042998

3005-
<hr><p></p>
2999+
<p></p>
30063000
<a name="THE_FILE_SYSTEM"><big><b>7. THE FILE SYSTEM</b></big></a>
30073001
<!-- ================== -->
30083002
<p>
@@ -3028,8 +3022,15 @@
30283022
</p><pre>
30293023
writeln(<font color=maroon>"result = "</font> <& number <font color=blue>div</font> 5 <& <font color=maroon>" "</font> <& <font color=blue>not</font> error);
30303024
</pre><p>
3031-
The <tt>'<&'</tt> operator requests a <tt>'<font color=blue>string</font>'</tt> as left operand and
3032-
is overloaded for various types as right operand.
3025+
The <tt>'<&'</tt> operator needs a <tt>'<font color=blue>string</font>'</tt> as left operand and
3026+
is overloaded for various types as right operand. To allow things like
3027+
</p><pre>
3028+
write(next_time <& <font color=maroon>" \r"</font>);
3029+
</pre><p>
3030+
the <tt>'<&'</tt> operator is also overloaded for various types as
3031+
left operand and a <tt>'<font color=blue>string</font>'</tt> as right operand.
3032+
This allows you to concatenate several objects with <tt>'<&'</tt> when
3033+
at least the first or the second object is a <tt>'<font color=blue>string</font>'</tt>.
30333034
We can also read data from the keyboard:
30343035
</p><pre>
30353036
write(<font color=maroon>"Amount? "</font>);
@@ -3765,9 +3766,9 @@
37653766
<font color=green>(* Statements that do the input *)</font>
37663767
...
37673768
<font color=blue>end func</font>;
3768-
</pre><p></p>
3769+
</pre><p></p><hr>
37693770

3770-
<hr><p></p>
3771+
<p></p>
37713772
<a name="DECLARATIONS"><big><b>8. DECLARATIONS</b></big></a>
37723773
<!-- =============== -->
37733774
<p>
@@ -3994,9 +3995,9 @@
39943995
is already defined. To allow the declaration of objects of a
39953996
new user defined type the constructor operation for this type
39963997
must be defined.
3997-
</p>
3998+
</p><hr>
39983999

3999-
<hr><p></p>
4000+
<p></p>
40004001
<a name="TOKENS"><big><b>9. TOKENS</b></big></a>
40014002
<!-- ========= -->
40024003
<p>
@@ -4293,9 +4294,9 @@
42934294
'\a' | '\b' | '\e' | '\f' | '\n' | '\r' | '\t' | '\v' |
42944295
'\\' | '\''' | '\"' | '\' upper_case_letter |
42954296
'\' { space } '\' | '\' integer_literal '\' .
4296-
</pre><p></p>
4297+
</pre><p></p><hr>
42974298

4298-
<hr><p></p>
4299+
<p></p>
42994300
<a name="EXPRESSIONS"><big><b>10. EXPRESSIONS</b></big></a>
43004301
<!-- =============== -->
43014302
<p>
@@ -4396,9 +4397,9 @@
43964397
</p><pre>
43974398
dot_expression ::=
43984399
[ '.' ] call_expression { '.' call_expression } .
4399-
</pre><p></p>
4400+
</pre><p></p><hr>
44004401

4401-
<hr><p></p>
4402+
<p></p>
44024403
<a name="OPERATING_SYSTEM_ACCESS"><big><b>11. OPERATING SYSTEM ACCESS</b></big></a>
44034404
<!-- =========================== -->
44044405
<p>
@@ -4481,9 +4482,9 @@
44814482
remove(<font color=maroon>"file"</font>);
44824483
rename(<font color=maroon>"old_name"</font>, <font color=maroon>"new_name"</font>);
44834484
copy(<font color=maroon>"from"</font>, <font color=maroon>"to"</font>);
4484-
</pre><p></p>
4485+
</pre><p></p><hr>
44854486

4486-
<hr><p></p>
4487+
<p></p>
44874488
<a name="PRIMITIVE_ACTIONS"><big><b>12. PRIMITIVE ACTIONS</b></big></a>
44884489
<!-- ===================== -->
44894490
<p>
@@ -4580,9 +4581,9 @@
45804581
</pre><p>
45814582
If you are interested in the primitive actions just look into
45824583
the file seed7_05.s7i .
4583-
</p>
4584+
</p><hr>
45844585

4585-
<hr><p></p>
4586+
<p></p>
45864587
<a name="ERRORS"><big><b>13. ERRORS</b></big></a>
45874588
<!-- ========== -->
45884589
<p></p>

0 commit comments

Comments
 (0)