
=============================
    Welcome to BasKid 0.2
=============================

BasKid has a basic-like syntax but I have changed things a bit
to create new commands or to make it easy to program. I am creating
new commands and functions and if you would like a new command or
function send me an email at vinians@terra.com.br but remember
this is a toy language not for professional use. It's just for
fun or to teach kids the first few steps in programing.
Lets go then:

================
Language Syntax:
================
You need to put LINE NUMBERS on each line like:
10 Cls
20 Print "Hello word!"
30 end

If you need to more commands on a same line you can put : to
separate them like:
10 Screen 640,480,8,FULL:N$="My First Program"
20 Print N$

MATH OPERATORS
==============
+,-,/,* Respectively Add, Subtract, Divide and Multiply

+ is used to concatenate strings too

RELATIONAL OPERATORS FOR STRING AND NUMBERS
===========================================
<  Less than
>  Greater than
<> Not equal to
>= Greater or equal to
<= Less than or equal to

BOOLEAN OPERATORS
=================
OR,AND

VARIABLES
=========
BasKid actually has only 2 variable types, numeric and string.
You can use whatever you want for the variable name, just start
with a letter like:

Total, test, MaxValue123 etc

For string variables you need to put the '$' symbol after the name like:
n$, MyName$, YourCountry1$ etc

==============
BASIC COMMANDS
==============
CLS
---
Clear the screen
Syntax: CLS
-------------------------------------------------------------
PRINT
-----
Show contents to the screen
Syntax:
Print <expression>;expression...[;]
Example:
100 a = 10
200 b = 20
300 print "a =";a;", b =";b
Result:
a = 10, b = 20
-------------------------------------------------------------
INPUT
-----
Get a user entry
Syntax:
Input [<strexpression>;]<var>
Example:
100 input "Enter your name: ";n$
200 input "Enter your age: ";a
300 print n$;", your age is";a;"."
Result:
Name, your age is 10.
-------------------------------------------------------------
GOTO
----
Jump to a line number
Syntax:
Goto <line_number>
-------------------------------------------------------------
ON..GOTO
--------
Jump to a line number according with a value of a expression
Syntax:
On <exp> Goto <line_number,line_number2,line_number3,...>
-------------------------------------------------------------
GOSUB
-----
Jump to a line number
Syntax:
Gosub <line_nuumber>
Obs: Gosub implements subroutine concept since its return when
RETURN command is found
--------------------------------------------------------------
ON..GOSUB
---------
Jump to a line number according with a value of a axpression
Syntax:
On <exp> Gosub <line_nuumber,line_number2,line_number3,...>
--------------------------------------------------------------
RETURN
------
Return to a subroutine previously called by GOUBS or ON..GOSUB
statement
Syntax:
RETURN
--------------------------------------------------------------

REM
---
All after it will be comments
Syntax:
Rem This is a comment
-------------------------------------------------------------
COLOR
-----
Change the default color
Syntax:
Color <[foreground],[background]>
-------------------------------------------------------------
FOR..NEXT
---------
Execute a block of commands in a loop
Syntax:
For <var>=<exp> to <exp> [step <exp>]

========================
CURRENT GRAPHIC COMMANDS
========================
SCREEN
------
Change to a graphic screen. You need before any graphics
Syntax:
Screen <ResX>,<ResY>,[<Colors>],[FULL]
------------------------------------------------------------

CIRCLE
------
Draw a circle
Syntax:
Circle(<xcoord>,<ycoord>),<radius>,[color],[FILL]
FILL means that will be a filled circle
------------------------------------------------------------

LINE
----
Draw a line
Syntax:
Line(<x1coord>,<y1coord>)-(<x2coord>,<y2coord>)[,color],[BOX/FILL]
BOX means box if you specify FILL it will be filled
------------------------------------------------------------

PSET
----
Draw a point
Syntax:
Pset(<xcoord>,<ycoord>)[,color]
------------------------------------------------------------

======================================
SOUND MANAGMENT FUNCTIONS
======================================
SoundLoad
---------
Load a .wav, .mid or .voc file
Syntax:
var_name =  SoundLoad(<file_name>)

Example:
10 Music = SoundLoad(".\Resources\JediTheme.mid")
20 SoundPlay(Music)
30 end
------------------------------------------------------------
SoundPlay
---------
Play a sound previously loaded with SoundLoad
Syntax:
SoundPlay(<sound_handle>)

Example:

See SoundLoad above
------------------------------------------------------------
SoundStop
---------
Stop sound playing
Syntax:
SoundStop(<sound_handle>)

Example:
10 buzz = SoundLoad(".\Resource\buzz.wav")
20 Print "PRESS X TO STOP!"
30 a$ = Inkey$
40 if a$ = "" then Goto 30
50 if a# = "X" then SoundStop(buzz)
60 Goto 30
70 Print "Sound Stopped"
80 Sleep 2000
90 end

======================================
CURRENT STRING MANIPULATIONS FUNCTIONS
======================================
MID$
----
Extract a part of an string
Syntax:
Mid$(<strexp>, <start>, <len>)
-----------------------------------------------------------
CHR$
----
Tranlate an ASCII code to a character representation
Syntax:
Chr$(<expr>)
-----------------------------------------------------------
UCASE$
------
Put the given string expression in upper case
Syntax:
UCASE$(<strexp>)
-----------------------------------------------------------
LEN
---
Return the length of a giver string expression
Syntax:
Len(<strexp>)
-----------------------------------------------------------
ASC
---
Return the ASCII code of given char
Syntax:
Asc(<strexp>)

======================
CURRENT MATH FUNCTIONS
======================
RND
---
Return a random number r,  0 <= r < 1
Syntax:
Rnd
Example:
100 x=100
200 y=rnd*x
300 print y
Result:
53.1189 
-----------------------------------------------------------
INT
---
Return the integer part of an expression
Syntax:
Int(<exp>)
Example:
100 x=12.53
200 y=int(x)
300 print y
Result:
12
-----------------------------------------------------------
SIN
---
Return the sine of an angle given in radians
Syntax:
Sin(<exp>)
-----------------------------------------------------------
COS
---
Return the cosine of an angle given in radians
Syntax:
Cos(<exp>)
-----------------------------------------------------------
TAN
---
Return the tangent of an angle given in radians
Syntax:
Tan(<exp>)
-----------------------------------------------------------
==================================
SPRITE AND OBJECT ENGINE FUNCTIONS
==================================
SpriteNew
---------
Create a new sprite 
Syntax:
var=SpriteNew()
Obs: you still need to add pictures to the sprite
-----------------------------------------------------------
SpriteAddImage
--------------
Add a image to a sprite
Syntax:
SpriteAddImage(Var, ".\Resource\Image1.bmp")
Obs: if your sprite have 3 frames you need to add 3 images
-----------------------------------------------------------
ObjectNew
---------
Create a new object, on postion x,y with a sprite attached
Syntax:
var = ObjectNew(<expr>,<expr>, numvar)
Example:
obMage = ObjectNew(100,100, spMage)
-----------------------------------------------------------
ObjectProp
----------
Set/Get a object property
Syntax:
ObjectProp(<object>, <PROPERTY_NAME>, <expr>)
Example:
ObjectProp(obMage,OP_HFORCE,4)
Current Object Property are:
OP_HFORCE         = horizontal force vector
OP_VFORCE         = vertical force vector
OP_X,OP_Y         = x and y position
OP_SPRITE         = Sprite attached to the object
OP_FRICTION       = friction to oppose object movement
OP_ANGLE          = angle of current object (0 to 255)
OP_ANGLE_FORCE    = force of angle rotation (0=none)
OP_ANGLE_FRICTION = friction of current angle force
OP_VISIBLE        = if true object will be visible

==================================
GAME CONTROLLER FUNCTION
==================================

####################################################################
Thanks to update/correct/improve this files to (alphabetic order):
Alex Hay
chaOs
####################################################################
