From cb1450b796eff3c8830616e2e9a3d83d4dfb4900 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 18 Oct 2008 22:47:31 +0000 Subject: backdowngrade --- docs/pod/fype.pod | 142 +++++++++++++++++++++++------------------------------- 1 file changed, 60 insertions(+), 82 deletions(-) (limited to 'docs/pod/fype.pod') 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 + +Specifies an integer number + +=item I + +Specifies a double number + +=item I + +Specifies a string + +=item I + +May be an integer or a double number + +=item I + +May be of any type above + +=item I + +No type + +=item I + +It's a variable name or a procedure name or a function name + +=back + +=head2 Explicit type conversions + +=over + +=item (I) B I + +Converts any type to an integer + +=item (I) B I + +Converts any type to a double + +=item (I) B I + +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 - -(Internal name TT_INTEGER) - -=item I - -(Internal name TT_DOUBLE) - -=item I - -(Internal name TT_STRING) - -=item I - -(Internal name TT_ARRAY) - -=item I - -May be an integer or a double number - -=item I - -May be of any type above - -=item I - -No type - -=item I - -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) B I - -Converts any type to an integer. - -=item (I) B I - -Converts any type to a double. - -=item (I) B I - -Converts any type to a string. - -=item (I) B I - -Converts any type to an array. This function is not yet implemented. - -=back - -=head2 More functions for data types - -=over - -=item (I) B I - -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 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 keyword! Example of defining variables: @@ -445,7 +423,7 @@ A function should be defined with the B keyword and deleted with the B