|Rapid-Q Documentation by William Yu (c)1999-2000||Chapter 2|
What are its limitations:
I can't speak for everybody, but the Rapid-Q IDE is a good tool to use when
starting out to learn the Rapid-Q language, but as you become more accustomed to
the language, most people would switch to their favourite text editor. That is
not to say that you should abandon using the Rapid-Q IDE altogether, if you feel
comfortable using it, by all means, stick with it.
2.3 Compiling and Running a Simple Application
DIM MainForm AS QFORM MainForm.ShowModal
If you're using the Rapid-Q IDE, just type in that code (or cut & paste if you like). Click on the Run Menu, and select Run. If all goes well, you should see an empty Window at the top left hand corner of the screen. Close it and return to your IDE. If you prefer the command line approach of compiling, then load up your favourite editor, copy the above code and save it to a file (Forms.BAS). Then to compile it, you type in:
If all goes well, you should have a Forms.EXE file in the current directory.
Just type Forms to run it. If all goes well, continue reading. If not,
then something is amiss, in which case, see the Trouble Shooting section.
2.4 Command line switches for RC.EXE
-I[Path] Change Include Path -L[Path] Change Library Path -G[File] Icon file
The compiler by default looks in the current directory for the .LIB files and any include files. You can override this by specifying the above command line switches. Since we're talking about C type parameters, there are a few niceties you have to know about, first, the paths should be specified like so:
You can use \ instead of / but there's a reason why / is preferred, consider this:
RC -I"c:\rapidq long dir\includes\"
If you never used C (or C++) you'll not likely see what I mean. If you prefer the above command line, you have to add an extra \ to the end (or drop it entirely), like so:
RC -I"c:\rapidq long dir\includes\\" or RC -I"c:\rapidq long dir\includes"
This is because C translates \" into " which is obvious to any C programmer.
Also, long file names must be enclosed in quotations. Those are the catches, so
now you know (or already knew).
Now, to change the default icon for your .EXE file, you can use the -G command switch:
RC -Gzip.ico zipview.bas
When your ZIPVIEW.EXE file is generated, the file "zip.ico" will replace the default icon. Please note that your icon must be 32x32 and 16 colors (also 766 bytes).
-CONS Generate CONSOLE App
-GUI Generate GUI App
-I<Path> Change Include Path
-L<Path> Change Library Path
-o I'm Stuck in Unix mode...
-b Dump byte code only
-opt Turn on Optimizations
-d<NAME> Add definition NAME -vON|OFF Toggle verbose output
-R -switch to redirect compiler output to
a file in the same directory as the .bas file called "DUMP.$$$".
2.5 General Structure of a Rapid-Q Program
This is only a general form, your Rapid-Q applications can be structured in a
variety of ways. Some of which will have similar results, and some will have
devasting or more customized results. For example, $INCLUDE is a
directive to import a file at that position. So if you use $INCLUDE
somewhere in your main program, it would have a different result than if you
included it at the beginning of your program.
2.6 How close to the BASIC Language is Rapid-Q?
PRINT "Hello" : PRINT "World" or PRINT "Hello" PRINT "World"
Most BASIC programmers will become very accustomed to the language once they
use it. However, Rapid-Q does not inherit the properties of Visual Basic. For
example, there's no SUB MAIN procedure, nor is there any public or
private identifiers used in Rapid-Q. Your entire program is considered the
MAIN program. Going from Rapid-Q to Visual Basic probably requires a bit
more effort than the reverse.
|Prev Chapter||Contents||Next Chapter|