
For command syntax, please refer to the qbasic.hlp file available in the downloads.
General Commands
Rem - Defines all code after it as invalid.
' - Similar to Rem.
: - Defines distinct code statements in a line.
; - Used to denote variables and as a conjunction.
Labeling - Used to label junctions in the program.
System - Terminates program and QBasic.
Shell - Attaches secondary shell version of Command.com to program.
End - Terminates program.
Sleep - Pauses indefinitely until user response.
Sleep (x) - Pauses until user response or for x seconds.
Randomize - Returns a random 0 or 1 value.
Randomize Timer - Returns a random value, not neccesarily 0 or 1.
Error, On Error - Defines error code in error situtations.
Text Commands
Print - Allows character output to screen.
Cls - Erases all active screen pixels.
Locate - Locates point position to support reinforcement commands.
Date$ - System date variable.
Time$ - System time variable.
Left$ - Allows selective plucking of a character string from the left.
Right$ - Allows selective plucking of a character string from the right.
Mid$ - Allows selective plucking of a character string from the centre.
Ucase$ - Converts target string to uppercase.
Lcase$ - Converts target string to lowercase.
Color Commands
Screen - Defines operational screen mode.
Color - Defines selective axiom object colour.
Line - Draws a line, rectangle, or square, depending on operational coding.
Circle - Draws a circle.
Palette - Allows selective definitions of the Color command.
Paint - Floods target pixel area and nearby open screen field with color.
View - Establishes secondary screen viewport.
Draw - Draws specified, selective, detailed shape.
Program Flow Commands
Input - Allows user input to a variable.
If. . .Then - Allows primary control flow depending on target condition.
Else If - Allows secondary control flow depending on target conditions.
End If - Terminates "If" flow statement.
Until - Defines condition for control flow ; applies to certain commands.
For. . .Next - Control flow type similar to Do. . .Loop; based on repeats.
Do. . .Loop - Repeats indefinitely. Not recommended. Use Do. . .Loop Until.
Do. . .Loop Until - Repeats until Loop condition is positive.
While. . .Wend - Repeats while Loop condition is operational.
While. . .Wend Until - Refer to While. . .Wend.
Def. . .As - Defines variable for in-program sub, with operational type.
Def Sub - Defines selected in-program sub.
Chain - Transfers program control to target program at secondary level.
Run - Transfers full program control to target program at primary level.
Dim. . .Shared - Defines variables between levels of in-program subs.
Dim. . .Shared As - Refer to above ; additional variable definition.
Common - Defines variables between programs linked with Chain.
File Commands
#1 - Allots primary nametag number to target open file.
Open - Allows primary user access to target file.
Open. . .For. . .As #1 - Similar to Open, but with parameters.
For Input - Data type, allows read access.
For Output - Data type, allows overwrite access.
For Append - Data type, allows secondary write access.
Input #1 - Transfers file contents into target variable.
Line Input #1 - Transfers present line contents into target variable.
Close #1 - Aborts access to target open file.
FAT Commands
Chdir - Changes current working directory.
Rmdir - Terminates target directory structure.
Mkdir - Creates target directory structure.
Kill - Terminates target file structure.
Name. . .As - Renames target file structure.
Sound Commands
Play - Allows access to internal speaker.
On Play - Allows background access to internal speaker.
Play song$ - Specifies parameters for internal access.
Timer Commands
Timer (x) - Defines Timer scope.
Timer On - Defines Timer status.
Timer Off - Defines Timer status.
Links
Arrow's QBasic Page
If you want your page to be added, send us email at lccorp1997@hotmail.com.
[ Home ] [ Intro ] [ Lessons ] [ Library ] [ Reference ] [ About ]
This Webpage is ThinkQuest entry Unknown.
Email: lccorp1997@hotmail.com
This Webpage is Designed for Netscape Navigator 3.0 and MSIE 3.0
We prefer a 24-bit True Color mode with 640x480 screen mode.
This Webpage created for Thinkquest 1998.