summaryrefslogtreecommitdiff
path: root/docs/pod/fype.pod
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-10-18 22:47:31 +0000
committerPaul Buetow <paul@buetow.org>2008-10-18 22:47:31 +0000
commitcb1450b796eff3c8830616e2e9a3d83d4dfb4900 (patch)
tree1ed2b992f9b082cf82913abeaff8c208ecab67dd /docs/pod/fype.pod
parenta35ace22b374005c65bda8302761d24f75280170 (diff)
backdowngrade
Diffstat (limited to 'docs/pod/fype.pod')
-rw-r--r--docs/pod/fype.pod142
1 files changed, 60 insertions, 82 deletions
diff --git a/docs/pod/fype.pod b/docs/pod/fype.pod
index 6ec8061..2e41645 100644
--- a/docs/pod/fype.pod
+++ b/docs/pod/fype.pod
@@ -68,6 +68,62 @@ Run a .fy file:
See the ./examples subdir of the Fype source distribution for examples! See also fype -h for a list of all options.
+=head1 DATA TYPES
+
+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.
+
+=head2 The basic data types
+
+=over
+
+=item I<integer>
+
+Specifies an integer number
+
+=item I<double>
+
+Specifies a double number
+
+=item I<string>
+
+Specifies a string
+
+=item I<number>
+
+May be an integer or a double number
+
+=item I<any>
+
+May be of any type above
+
+=item I<void>
+
+No type
+
+=item I<identifier>
+
+It's a variable name or a procedure name or a function name
+
+=back
+
+=head2 Explicit type conversions
+
+=over
+
+=item (I<integer>) B<integer> I<any>
+
+Converts any type to an integer
+
+=item (I<double>) B<double> I<any>
+
+Converts any type to a double
+
+=item (I<string>) B<string> I<any>
+
+Converts any type to a string
+
+=back
+
=head1 SYNTAX
=head2 Comments
@@ -82,9 +138,9 @@ A Fype program is a list of statements. Each keyword, expression or function cal
say foo;
exit foo - bar;
-=head2 Parenthesis
+=head2 Paranthesis
-All parenthesis of function calls are optional. They help to make the code better readable. They also help to force precedences of expressions.
+All paranthesis of function calls are optional. They help to make the code better readable. They also help to force precedences of expressions.
=head2 Scopeing
@@ -135,84 +191,6 @@ Runs the statements as long as the the expression evaluates to a false value.
=back
-=head1 DATA TYPES
-
-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.
-
-=head2 The basic data types
-
-=over
-
-=item I<integer>
-
-(Internal name TT_INTEGER)
-
-=item I<double>
-
-(Internal name TT_DOUBLE)
-
-=item I<string>
-
-(Internal name TT_STRING)
-
-=item I<array>
-
-(Internal name TT_ARRAY)
-
-=item I<number>
-
-May be an integer or a double number
-
-=item I<any>
-
-May be of any type above
-
-=item I<void>
-
-No type
-
-=item I<identifier>
-
-It's a variable name or a procedure name or a function name
-
-=back
-
-=head2 Explicit type conversions
-
-The data types inside the brackets are only showing the return types of each function.
-
-=over
-
-=item (I<integer>) B<integer> I<any>
-
-Converts any type to an integer.
-
-=item (I<double>) B<double> I<any>
-
-Converts any type to a double.
-
-=item (I<string>) B<string> I<any>
-
-Converts any type to a string.
-
-=item (I<array>) B<array> I<any>
-
-Converts any type to an array. This function is not yet implemented.
-
-=back
-
-=head2 More functions for data types
-
-=over
-
-=item (I<string>) B<type> I<any>
-
-Returns the name of the current type. Examples:
-
- my foo = 1;
- put type foo; # Prints "TT_INTEGER"
- put type 1.2; # Prints "TT_DOUBLE"
-
=head1 VARIABLES
Variables can be defined with the B<my> keyword. If you don't assign a value during declaration, then it's using the default integer value 0. Variables may be changed during program runtime. Variables may be deleted using the B<undef> keyword! Example of defining variables:
@@ -445,7 +423,7 @@ A function should be defined with the B<func> keyword and deleted with the B<und
my a = 2, b = 4;
foo; # Run the procedure. Print out "11\n"
- say c; # Will produce an error, because c is out of scope!
+ say c; # Will produce an error, because c is out of scoped!
=head2 Nested functions
@@ -472,5 +450,5 @@ The Fype Language (http://fype.buetow.org)
=head1 SEE ALSO
-awk(1) cc(1)
+awk(1) cc(1) make(1)