TWL (TheWarrior Language) 2005 Reloaded Version 0.4 BETA

Welcome and thank-you for downloading this great project. TWL is a programming language designed by TheWarrior It is a lite language designed for people who need a simple language to process files in their computer, or build a simple website. Here is a simple documentation on how to use this language.

License

Copyright (C) TheWarrior Productions 2005

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

About TheWarrior Productions

TheWarrior Productions (TwProd) is a small programming team dedicated to releasing quality sofware out to the comunity, wether it's released for free or as a commercial license. Examples of our sofware are TwProd Forum V1, TwProd Forum V2, C & C Renegade BotMaker Pro, Mod ReadMe-Maker, and much others. To contact TheProd you can email TheWarrior @ twmadcow@gmail.com.

Changes from older versions

Changes and bugfixes from 0.3:

1. Cookie Support ( setcookie( string name, string value) / getcookie(string name) ) *** DONE ***
2. Post and get support (get_vars(string name) / post_vars(string name) ) *** DONE ***
3. Fix error line *** DONE ***
4. Script doesnt look for ending " (Whoopy) *** DONE ***
5. Bulk output *** DONE ***
6. Remove the need for print_headers() by using automatic header outputting system *** DONE ***
7. In fatal errors, add a line before error, and make FATAL(line) bold. *** DONE ***
8. -- MAJOR -- Doesnt replace old argument value from arguements, so the second argument will be first+second value. ** DONE **
9. Commenting system, and remove loose commenting. *** DONE ***

Basic Syntax

TWL has a unique syntax which has twists from alot of languages. Here is the basic syntax:
Each command is seperated by a line, not a ';' such as other programming languages
command 1
command 2
Etc...
Functions must be executed with its name, parenthesis, then the arguments, which are seperated by commas
function_name( arg1,arg2 )
Variables must start with a $ , and cannot contain spaces.
$variable = "value"
Commented lines must start with a #
#This is a comment
Bulk output (Outputting data without using print) must have one line with ONLY @, and an ending line with ONLY @
@
Hello World! This will be outputted exactly like using print!<br />
Cool Huh?
@

Variables

Variables, as mentioned earlier much start with a $, and they are given a value using the = character.
$variable = "value"
$variable = $othervariable
$variable = function( arg1, arg2)
To add 2 or more values in one time, we use a way similar to PHP's. By using '.' you can add more than one value at a time.
$variable = "Hello " . "world!"
$variable = "Hello " . $othervariable
$variable = $othervariable . $anothervariable

Function List

Since this is just the alpha version, they arent many functions, but nevertheless, here's the list
  1. print( string output ) Outputs 'output' to the screen. And automatically prints headers.
  2. getenv( string name ) Returns the 'name' environment variable
  3. n( ) Returns a new line (Not <br />)
  4. get_vars( string name ) Returns the variable 'name' from the query string. (Like PHP's $_GET)
  5. post_vars( string name ) Returns the variable 'name' from the POST. (Like PHP's $_POST)
  6. setcookie( string name, string value ) Sets a cookie 'name' with the value 'value'. (Note: Will give an error if headers are already sent)\
  7. getcookie( sting name ) Returns the cookie value for the cookie 'name'

Credits

TheWarrior Did everything! From coding to compiling and releasing.

PHP 1.99 Thanks for that small 20 line'd source code I got from you.

Whoopy For testing and finding some bugs.

Mayukh For helping me in the beginning