summaryrefslogtreecommitdiff
path: root/docs/pod/fype.pod
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-09-16 17:05:51 +0000
committerPaul Buetow <paul@buetow.org>2008-09-16 17:05:51 +0000
commit71185ab0ab0b08b4d5bb2e750ff85e11f105a453 (patch)
treea6ad933176f92b60d2f1560d2f1bac46ec6b9566 /docs/pod/fype.pod
parent8b31b18a43dea55489e70d5b2ea6fc183cc67533 (diff)
array progress
Diffstat (limited to 'docs/pod/fype.pod')
-rw-r--r--docs/pod/fype.pod142
1 files changed, 82 insertions, 60 deletions
diff --git a/docs/pod/fype.pod b/docs/pod/fype.pod
index 2e41645..6ec8061 100644
--- a/docs/pod/fype.pod
+++ b/docs/pod/fype.pod
@@ -68,62 +68,6 @@ 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
@@ -138,9 +82,9 @@ A Fype program is a list of statements. Each keyword, expression or function cal
say foo;
exit foo - bar;
-=head2 Paranthesis
+=head2 Parenthesis
-All paranthesis of function calls are optional. They help to make the code better readable. They also help to force precedences of expressions.
+All parenthesis of function calls are optional. They help to make the code better readable. They also help to force precedences of expressions.
=head2 Scopeing
@@ -191,6 +135,84 @@ 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:
@@ -423,7 +445,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 scoped!
+ say c; # Will produce an error, because c is out of scope!
=head2 Nested functions
@@ -450,5 +472,5 @@ The Fype Language (http://fype.buetow.org)
=head1 SEE ALSO
-awk(1) cc(1) make(1)
+awk(1) cc(1)