Aldora Help

Keywords...........................1

-=Chapter One: Keywords=-
PROCEDURE GETSTR
syntax: Getstr(@string);
        This procedure will retrive text input from the keyboard and store
it in the string varible declared as @string.
EXAMPLE:
procedure readname is
name : string;
begin
        putline("Input your name");
        getstr(@name);
end;

PROCEDURE PUTLINE
syntax: Putline(varible or const);
        This procedure is the basic graphical text mode output procedure.
Example:
procedure sayname is
name : string;
begin
        Name := "Kyle";
        putline("Hello My Name is");
        putline(kyle);
end;
PROCEDURE PUTSTR
syntax: Putstr(varible or const);
        This procedure will output to the current line and not reset the line
pointer so you can write more on the line. Similar to PUTLINE
EXAMPLE:
see putline
PROCEDURE NEWLINE
        This procedure will advance the screen one line down. Similary you
could put PUTLINE(""); to accomplish the same thing.
EXAMPLE
procedure advance is
begin
        NEWLINE; -- Advances the screen
        PUTLINE(""); -- same thing!
end;
PROCEDURE CLRSCR;
         Clrscr is an abrevation of clear screen. This will erase the contents
 of the graphic screen. It will NOT redraw the menu bar(it is dose not work
 while a program is runing so you don't need it) or home the virtual text
 cursor.
EXAMPLE
procedure clear is
begin
        PUTLINE("Dirty Screen");
        CLRSCR;
        PUTLINE("Clean Screen!");
end;
PROCEDURE DELAY(absolute number)
        Delay will stop the processing of the program until the number set
for has passed. It is done in miliseconds. So Delay(1000) will halt execution
for exactly 1000 miliseconds or one second.
PROCEDURE SOUND(absolute number)
        Sound is a procedure that will send a signal to the computer's
speaker to procduce a sound at the absoulte number's frequency. NOTE Sound
will not automaticly stop, it must be told to stop beeping, thus if you wanted
to play a sound at 1000 for 1 second and stop you would write it like this:
procedure NoGoSound is
begin
sound(1000);
delay(1000);
nosound;
end;
PROCEDURE NoSound
        Nosound is second most important procedure in controling the PC's
speaker, it stops it!
PROCEDURE INITGRAPH(value 1-3)
        Initgraph is a procedure to re initlize the graphics engine for Aldora.
This procedure will clear the screen and home the cursor, but should *not* be
used as a clear screen fuction, becuase it takes time to load the driver. This
can be useful if something that switched aldora to text mode, this fuction
could reload it fresh. It will be really useful in the next version, that will
allow the use of OS Shell/Program Shell procedures. It can also change the
graphic mode of aldora to 640x480(1), 640x350(2) or 640x200(3).
PROCEDURE Rectangle(x1,y1,x2,y2)
        This procedure is that will draw a rectangle or box on the screen. It
will draw it in the color set by TXTCOLOR.
PROCEDURE SetFill(pattern,color)
        Set Fill will set the fill patern and color to your desired values.
Here are the valid fill patterns:
 1.............Uses color set by TXTCOLOR
 2............. --- fill
 3............. /// fill
 4............. /// thick fill
 5............. \thick fill
 6............. \fill
 7............. Light hatch fill
 8............. Heavy cross hatch
 9............. Interleaving line
 10............ Widely spaced dot
 11............ Closely spaced dot
Here are the valid Color for aldora :
 0   Black
 1   Blue
 2   Green
 3   Cyan
 4   Red
 5   Magenta
 6   Brown
 7   LightGray
 8   DarkGray
 9   LightBlue
 10  LightGreen
 11  LightCyan
 12  LightRed
 13  LightMagenta
 14  Yellow
 15  White

PROCEDURE BAR(x1,y1,x2,y2)
          Bar is similar to rectangle, except that it draws a filled box
with the set fill parameters in SETFILL.
PROCEDURE Circle(X,Y,Radius)
          Circle is a procedure to draw a true circle. X and Y are the center
point of the circle. Radius is the length from the center to the edge of the
circle.
PROCEDURE Outtext(X,Y,2write)
          This procedure is a way to write a string to the screen besides
putline. This is mainly for graphics and fonts. It can be any font in the
aldora font engine, plus the default bitmaped font.
EXAMPLE
procedure demo is
begin
     putline("This is Virtual Text Output (VTO)");
     outtext(200,200,"This is Graphical Output!");
end;
PROCEDURE Settype(Font,Direction,Size)
          Settype will make the default output and the graphical output in
a font specified in this procedure. It can also delcare the direction and
size of the type.
Valid Fonts:
0     Default 8x8 font
1     Triplex Font
2     Small Font
3     SansSerifFont
4     GothicFont
(NOTE: You'll have to try the other ones, it varies among versions..)
Directions:
0     Horiz Direction
1     Vertical Direction
      Sizes may be from 1-8.
PROCEDURE Sprite(fname,x,y,puttype)
          Sprite is one of the most powerful procedures in the Aldora API.
This procedure can load a graphics file from the disk, display it, and
do effects with it. The graphics may come from many sources, such as
Tegas by BSX International or Peter Donnelly's Clip Utilitys(both are good
shareware). Fname is the file name of the sprite file, X and Y are the
position of the sprite(upper right corner). Puttype is how the image is
displayed. Here are the valid puttype codes:
           name         num           effect
           Normal        0           Display image normaly
           XOR           1           This will display the image in XOR,
                                     or were you can put it on a background
                                     display it then display it again and
                                     the background is restored!
           OR            2           ORs the image, similar to XOR.
           NOT           4           Displays the image in reverse.

PROCEDURE Line(x1,y1,x2,y2)
          Line will display a line of pixels from point (x1,y1) to point
(x2,y2). Just a plain line.
PROCEDURE Link(prg2run)
          Link is an intesting procedure that will run another program
from within a program, this would be good for writing a menu program for
Aldora OS. prg2run is the file name of the PCode.
PROCEDURE Shmouse and PROCEDURE HdMouse
          These procedure will show and hide the mouse cursor respectively.
It is a good idea when redrawing the screen to hide the mouse cursor.
FUNCTION MouseX And MouseY
         MouseX and MouseY will return the current position of the mouse
cursor on the screen.
FUNCTION Mousebtn
         This function will return the stats of the mouse buttons. Here
are the mouse codes:
                      0 = no buttons pressed
                      1 = button 1 being pressed
                      2 = button 2 being pressed
                      3 = buttons 1 & 2 being pressed
                      4 = button 3 being pressed
                      5 = buttons 1 & 3 being pressed
                      6 = butons 2 & 3 being pressed
                      7 = buttons 1, 2, & 3 being pressed
PROCEDURE ResetMsg
          This procedure will reset the internal varible count for displaying
message boxes.
PROCEDURE







