summaryrefslogtreecommitdiff
path: root/docs/pod/fype.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/pod/fype.html')
-rw-r--r--docs/pod/fype.html191
1 files changed, 80 insertions, 111 deletions
diff --git a/docs/pod/fype.html b/docs/pod/fype.html
index 47397a4..b88a1b4 100644
--- a/docs/pod/fype.html
+++ b/docs/pod/fype.html
@@ -20,24 +20,23 @@
<li><a href="#parsing___code_generation">PARSING / CODE GENERATION</a></li>
<li><a href="#requirements">REQUIREMENTS</a></li>
<li><a href="#getting_started">GETTING STARTED</a></li>
+ <li><a href="#data_types">DATA TYPES</a></li>
+ <ul>
+
+ <li><a href="#the_basic_data_types">The basic data types</a></li>
+ <li><a href="#explicit_type_conversions">Explicit type conversions</a></li>
+ </ul>
+
<li><a href="#syntax">SYNTAX</a></li>
<ul>
<li><a href="#comments">Comments</a></li>
<li><a href="#statements">Statements</a></li>
- <li><a href="#parenthesis">Parenthesis</a></li>
+ <li><a href="#paranthesis">Paranthesis</a></li>
<li><a href="#scopeing">Scopeing</a></li>
<li><a href="#control_statements">Control statements</a></li>
</ul>
- <li><a href="#data_types">DATA TYPES</a></li>
- <ul>
-
- <li><a href="#the_basic_data_types">The basic data types</a></li>
- <li><a href="#explicit_type_conversions">Explicit type conversions</a></li>
- <li><a href="#more_functions_for_data_types">More functions for data types</a></li>
- </ul>
-
<li><a href="#variables">VARIABLES</a></li>
<li><a href="#built_in_functions">BUILT IN FUNCTIONS</a></li>
<ul>
@@ -133,81 +132,6 @@ TODO file of the source distribution of Fype!</p>
<p>
</p>
<hr />
-<h1><a name="syntax">SYNTAX</a></h1>
-<p>
-</p>
-<h2><a name="comments">Comments</a></h2>
-<p>Text from a <strong>#</strong> character until the end of the current line is considered being a comment. Multi line comments may start with an <strong>#*</strong> and and with an <strong>*#</strong> anywhere. Exceptions are if those signs are inside of strings.</p>
-<p>
-</p>
-<h2><a name="statements">Statements</a></h2>
-<p>A Fype program is a list of statements. Each keyword, expression or function call is part of a statement. Each statement is ended with a semicolon. Example:</p>
-<pre>
- my bar = 3, foo = 1 + 2;
- say foo;
- exit foo - bar;</pre>
-<p>
-</p>
-<h2><a name="parenthesis">Parenthesis</a></h2>
-<p>All parenthesis of function calls are optional. They help to make the code better readable. They also help to force precedences of expressions.</p>
-<p>
-</p>
-<h2><a name="scopeing">Scopeing</a></h2>
-<p>A new scope starts with an { and ends with an }. An exception is a procedure, which does not use its own scope (see later in this manual). Control statements and functions support scopeings. Here is a small example how to use scopes:</p>
-<pre>
- my foo = 1;</pre>
-<pre>
- {
- # Prints out 1
- put defined foo;
- {
- my bar = 2;</pre>
-<pre>
- # Prints out 1
- put defined bar;
- }</pre>
-<pre>
- # Prints out 0
- put defined bar;</pre>
-<pre>
- my baz = 3;
- }</pre>
-<pre>
- # Prints out 0
- say defined bar;</pre>
-<p>
-</p>
-<h2><a name="control_statements">Control statements</a></h2>
-<p>Fype knows the following control statements:</p>
-<dl>
-<dt><strong><a name="item_if__3cexpression_3e__7b__3cstatements_3e__7d">if <em>&lt;expression</em>&gt; { <em>&lt;statements</em>&gt; }</a></strong>
-
-<dd>
-<p>Runs the statements if the expression evaluates to a true value.</p>
-</dd>
-</li>
-<dt><strong><a name="item_ifnot__3cexpression_3e__7b__3cstatements_3e__7d">ifnot <em>&lt;expression</em>&gt; { <em>&lt;statements</em>&gt; }</a></strong>
-
-<dd>
-<p>Runs the statements if the expression evaluates to a false value.</p>
-</dd>
-</li>
-<dt><strong><a name="item_while__3cexpression_3e__7b__3cstatements_3e__7d">while <em>&lt;expression</em>&gt; { <em>&lt;statements</em>&gt; }</a></strong>
-
-<dd>
-<p>Runs the statements as long as the the expression evaluates to a true value.</p>
-</dd>
-</li>
-<dt><strong><a name="item_until__3cexpression_3e__7b__3cstatements_3e__7d">until <em>&lt;expression</em>&gt; { <em>&lt;statements</em>&gt; }</a></strong>
-
-<dd>
-<p>Runs the statements as long as the the expression evaluates to a false value.</p>
-</dd>
-</li>
-</dl>
-<p>
-</p>
-<hr />
<h1><a name="data_types">DATA TYPES</a></h1>
<p>Fype uses auto type conversion. However, if you want to know what's going on you may take a look at the provided basic datatypes.</p>
<p>
@@ -217,25 +141,19 @@ TODO file of the source distribution of Fype!</p>
<dt><strong><a name="item_integer"><em>integer</em></a></strong>
<dd>
-<p>(Internal name TT_INTEGER)</p>
+<p>Specifies an integer number</p>
</dd>
</li>
<dt><strong><a name="item_double"><em>double</em></a></strong>
<dd>
-<p>(Internal name TT_DOUBLE)</p>
+<p>Specifies a double number</p>
</dd>
</li>
<dt><strong><a name="item_string"><em>string</em></a></strong>
<dd>
-<p>(Internal name TT_STRING)</p>
-</dd>
-</li>
-<dt><strong><a name="item_array"><em>array</em></a></strong>
-
-<dd>
-<p>(Internal name TT_ARRAY)</p>
+<p>Specifies a string</p>
</dd>
</li>
<dt><strong><a name="item_number"><em>number</em></a></strong>
@@ -266,47 +184,98 @@ TODO file of the source distribution of Fype!</p>
<p>
</p>
<h2><a name="explicit_type_conversions">Explicit type conversions</a></h2>
-<p>The data types inside the brackets are only showing the return types of each function.</p>
<dl>
<dt><strong><a name="item__28integer_29_integer_any">(<em>integer</em>) <strong>integer</strong> <em>any</em></a></strong>
<dd>
-<p>Converts any type to an integer.</p>
+<p>Converts any type to an integer</p>
</dd>
</li>
<dt><strong><a name="item__28double_29_double_any">(<em>double</em>) <strong>double</strong> <em>any</em></a></strong>
<dd>
-<p>Converts any type to a double.</p>
+<p>Converts any type to a double</p>
</dd>
</li>
<dt><strong><a name="item__28string_29_string_any">(<em>string</em>) <strong>string</strong> <em>any</em></a></strong>
<dd>
-<p>Converts any type to a string.</p>
-</dd>
-</li>
-<dt><strong><a name="item__28array_29_array_any">(<em>array</em>) <strong>array</strong> <em>any</em></a></strong>
-
-<dd>
-<p>Converts any type to an array. This function is not yet implemented.</p>
+<p>Converts any type to a string</p>
</dd>
</li>
</dl>
<p>
</p>
-<h2><a name="more_functions_for_data_types">More functions for data types</a></h2>
+<hr />
+<h1><a name="syntax">SYNTAX</a></h1>
+<p>
+</p>
+<h2><a name="comments">Comments</a></h2>
+<p>Text from a <strong>#</strong> character until the end of the current line is considered being a comment. Multi line comments may start with an <strong>#*</strong> and and with an <strong>*#</strong> anywhere. Exceptions are if those signs are inside of strings.</p>
+<p>
+</p>
+<h2><a name="statements">Statements</a></h2>
+<p>A Fype program is a list of statements. Each keyword, expression or function call is part of a statement. Each statement is ended with a semicolon. Example:</p>
+<pre>
+ my bar = 3, foo = 1 + 2;
+ say foo;
+ exit foo - bar;</pre>
+<p>
+</p>
+<h2><a name="paranthesis">Paranthesis</a></h2>
+<p>All paranthesis of function calls are optional. They help to make the code better readable. They also help to force precedences of expressions.</p>
+<p>
+</p>
+<h2><a name="scopeing">Scopeing</a></h2>
+<p>A new scope starts with an { and ends with an }. An exception is a procedure, which does not use its own scope (see later in this manual). Control statements and functions support scopeings. Here is a small example how to use scopes:</p>
+<pre>
+ my foo = 1;</pre>
+<pre>
+ {
+ # Prints out 1
+ put defined foo;
+ {
+ my bar = 2;</pre>
+<pre>
+ # Prints out 1
+ put defined bar;
+ }</pre>
+<pre>
+ # Prints out 0
+ put defined bar;</pre>
+<pre>
+ my baz = 3;
+ }</pre>
+<pre>
+ # Prints out 0
+ say defined bar;</pre>
+<p>
+</p>
+<h2><a name="control_statements">Control statements</a></h2>
+<p>Fype knows the following control statements:</p>
<dl>
-<dt><strong><a name="item__28string_29_type_any">(<em>string</em>) <strong>type</strong> <em>any</em></a></strong>
+<dt><strong><a name="item_if__3cexpression_3e__7b__3cstatements_3e__7d">if <em>&lt;expression</em>&gt; { <em>&lt;statements</em>&gt; }</a></strong>
<dd>
-<p>Returns the name of the current type. Examples:</p>
+<p>Runs the statements if the expression evaluates to a true value.</p>
</dd>
+</li>
+<dt><strong><a name="item_ifnot__3cexpression_3e__7b__3cstatements_3e__7d">ifnot <em>&lt;expression</em>&gt; { <em>&lt;statements</em>&gt; }</a></strong>
+
<dd>
-<pre>
- my foo = 1;
- put type foo; # Prints &quot;TT_INTEGER&quot;
- put type 1.2; # Prints &quot;TT_DOUBLE&quot;</pre>
+<p>Runs the statements if the expression evaluates to a false value.</p>
+</dd>
+</li>
+<dt><strong><a name="item_while__3cexpression_3e__7b__3cstatements_3e__7d">while <em>&lt;expression</em>&gt; { <em>&lt;statements</em>&gt; }</a></strong>
+
+<dd>
+<p>Runs the statements as long as the the expression evaluates to a true value.</p>
+</dd>
+</li>
+<dt><strong><a name="item_until__3cexpression_3e__7b__3cstatements_3e__7d">until <em>&lt;expression</em>&gt; { <em>&lt;statements</em>&gt; }</a></strong>
+
+<dd>
+<p>Runs the statements as long as the the expression evaluates to a false value.</p>
</dd>
</li>
</dl>
@@ -611,7 +580,7 @@ keyword in order to check if a procedure has been defined or not.</p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
-<p><code>awk(1)</code> <code>cc(1)</code>
+<p><code>awk(1)</code> <code>cc(1)</code> <code>make(1)</code>
</p>