From 71185ab0ab0b08b4d5bb2e750ff85e11f105a453 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 16 Sep 2008 17:05:51 +0000 Subject: array progress --- docs/pod/fype.pod | 142 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 82 insertions(+), 60 deletions(-) (limited to 'docs/pod/fype.pod') 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 - -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 @@ -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 + +(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: @@ -423,7 +445,7 @@ A function should be defined with the B keyword and deleted with the B