B A S I C     C O M P I L E R     O P T I O N S

    HOME             ESPAÑOL     OTHER TUTORIAL AT FOOTPAGE.

THE BASIC COMPILER (BC.EXE) TAKE THE SOURCE FILES AND CONVERT THEM IN OBJECT FILES (.OBJ). WITH THE PROGRAM LINK.EXE, THESE OBJECT FILES FORM THE EXECUTABLE FILES, .EXE OR .DLL, ALSO CAN MAKE THE LIBRARIES THAT YOU WILL USE TOGETHER WITH YOUR PROGRAMS, .LIB OR .QLB.

THESE STEPS ARE MADE AUTOMATICLY WHEN YOU HAVE A SOURCE FILE IN YOUR EDITOR OF THE QBASIC (OR THE VISUAL BASIC FOR MS-DOS), AND YOU CONVERT IT TO AN EXECUTABLE FILE FROM THE MENUS BAR WITH THE OPTIONS RUN, AND MAKE EXE FILE.

THE THREE MAIN VERSIONS OF THE BASIC COMPILERS (QBASIC 4.5, QBASIC EXTENDED AND THE VISUAL BASIC FOR MS-DOS) KEEP THE SAME NAME OF THE PROGRAM (BC.EXE) BUT THEY HAVE SOME DIFFERENCES.

THE OPTIONS OF THE BASIC COMPILER OF THE QBASIC 4.5 ARE 14, IT DOES NOT RECOGNIZE ANY HELP OPTION, /?, /H, OR /HELP. THE BASIC COMPILER OF THE QBASIC EXTENDED DISPLAYS 32 OPTIONS AND 2 NOT DISPLAYED IN THE SCREEN SHORT HELP. THE VISUAL BASIC STANDARD EDITION SCREEN SHORT HELP DISPLAYS 17 OPTIONS BUT THE PROFESSIONAL EDITION DISPLAYS 23.

THESE NEXT ARGUMENTS CAN BE TYPED ON THE OPERATING SYSTEM COMMAND LINE FOLLOWING THE BC COMMAND:

BC.EXE  SOURCEFILE  [,OBJECTFILE]
[,LISTINGFILE]  [/OPTIONSLIST]  [;]

SOURCEFILE:
    THIS IS THE NAME OF YOUR QBASIC SOURCE CODE FILE (.BAS) THAT YOU WILL COMPILE. IF IT IS SPECIFIED USER THEN THE INPUT WILL BE TAKEN FROM THE KEYBOARD. IN THE VISUAL BASIC ALSO CAN BE A FORMS FILE (.FRM).
OBJECTFILE.—   THE NAME OF THE OBJECT FILE (.OBJ) YOU ARE CREATING.

LISTINGFILE:
    THE NAME OF THE FILE (.LST) THAT WILL CONTAIN AN ASSEMBLY-CODE SOURCE LISTING OF THE COMPILER-GENERATED CODE. THE FILE CONTAINS THE ADDRESS OF EACH LINE IN YOUR SOURCE FILE, THE TEXT OF THE SOURCE FILE, ITS SIZE, AND ANY ERROR MESSAGES PRODUCED DURING THE COMPILATION. IF USER IS SPECIFIED THEN THE LISTING WILL BE SENT TO THE SCREEN.
OPTIONSLIST.—   THESE ARE ONE OR MORE OF THE COMMAND-LINE OPTIONS SHOWN BELOW.

[ ; ]
    THIS SEMICOLON IT IS USED AT THE END OF THE COMMAND LINE TO INDICATE THAT WILL BE USED THE DEFAULT VALUES IN THE ARGUMENTS THAT YOU DID NOT INDICATE; IF YOU DO NOT WRITE IT THEN THE BASIC COMPILER WILL PROMPT YOU FOR THOSE ARGUMENTS.
LIST OF OPTIONS
    THIS IS THE LIST OF OPTIONS FOR THE THREE BASIC COMPILERS. THERE ARE 32 AND ONLY THE QBASIC EXTENDED USE THE 32 OF THEM. IN THE QBASIC EXTENDED AND THE VISUAL BASIC PROFESSIONAL, WHEN YOU COMPILE FROM THE EDITOR, THESE OPTIONS ALSO CAN BE CHOSEN IN THE DIALOG BOX MAKE EXE FILE OR YOU CAN WRITE THEM IN THE TEXT BAR CALLED ADDITIONAL OPTIONS:
/?
    IT DISPLAYS THE COMMAND-LINE SYNTAX AND THE OPTIONS OF THE COMPILER. THIS OPTION IT'S NOT RECOGNIZED FOR THE QBASIC 4.5.
/A
    CREATES A LISTING FILE OF THE DISASSEMBLED OBJECT CODE FOR EACH SOURCE LINE AND SHOWS THE ASSEMBLY LANGUAGE CODE GENERATED BY THE COMPILER. MUST BE WRITEN A FILE NAME OR THE FILE WON'T BE CREATED.
/AH
    ALLOWS DYNAMIC ARRAYS OF RECORDS, FIXED-LENGTH STRINGS, AND NUMERIC DATA TO BE LARGER THAN 64 KBS. EACH. IF THE /AH IS NOT SPECIFIED, THE MAXIMUM SIZE IS 64 KBS. FOR EVERY DYNAMIC ARRAY.

    PDS.—   BE SURE TO USE EITHER THE OPTIONS /AH OR /D WHEN YOU ARE COMPILING QBASIC LIBRARY ROUTINES THAT WILL BE LOADED INTO THE QBASIC EXTENDED EDITOR WITH THE /EA OPTION (WHICH MOVES ARRAYS INTO THE EXPANDED MEMORY). THIS IS NECESSARY BECAUSE /AH AND /D CAUSE RUN-TIME CALLS INSTEAD OF INLINE CODE GENERATION FOR THE ARRAY REFERENCES. /AH IT MEANS ARRAY HUGE.
/C:BUFFERSIZE
    SETS THE SIZE OF THE BUFFER RECEIVING REMOTE DATA FOR EACH COMMUNICATIONS PORT WHEN YOU ARE USING AN ASYNCHRONOUS COMMUNICATIONS ADAPTER.
/D
    GENERATES DEBUGGING CODE FOR RUN-TIME ERROR CHECKING AND ENABLES THE CTRL+BREAK. THIS OPTION MAKES THE PROGRAMS LARGER AND SLOWER, WHEN A PROGRAM IT'S RUNNING CORRECTLY COULD BE CONVENIENT FOR YOU TO ELUDE IT

    UNLESS YOU WANT THAT YOUR EXECUTABLE CAN BE STOPPED WITH THE CTRL+PAUSE. THIS OPTION IT'S THE SAME OPTION RUN-TIME ERROR CHECKING OF THE MENU RUN AND THE COMMAND MAKE EXE FILE OF THE EDITOR.

    PDS.—   FOR THE ISAM PROGRAMS, CAUSES QBASIC TO WRITE OPEN DATABASE BUFFERS TO THE DISK AFTER EVERY DELETE, INSERT, UPDATE, OR CLOSE STATEMENT. BE SURE TO USE EITHER /D OR /AH WHEN YOU ARE COMPILING QBASIC LIBRARY ROUTINES THAT WILL BE LOADED INTO THE QBASIC EXTENDED EDITOR WITH THE /EA OPTION.

    THE /EA OPTION MOVES ARRAYS INTO THE EXPANDED MEMORY. THIS IS NECESSARY BECAUSE /D AND /AH CAUSE RUN-TIME CALLS INSTEAD OF IN-LINE CODE GENERATION FOR THE ARRAY REFERENCES.
/E
    IT ENABLES THE ON ERROR CHECKING. SPECIFIES THE PRESENCE OF ON ERROR STATEMENTS WITH RESUME LINENUMBER STATEMENTS. ALSO SEE THE DISCUSSION OF THE /X OPTION IN THIS LIST.
/ES
    ALLOWS YOU TO SHARE THE EXPANDED MEMORY BETWEEN THE QBASIC AND THE MIXED-LANGUAGE ROUTINE(S) THAT ALSO USE THE EXPANDED MEMORY. SPECIFY /ES WHEN YOU ARE GOING TO USE A MIXED-LANGUAGE ROUTINE THAT MAKES USE OF EXPANDED MEMORY. /ES IT MEANS EXPANDED MEMORY SHARED.
/FBR [FILENAME]
    RESTRICTED BROWSE INFORMATION. GENERATES A FILE CONTAINING RESTRICTED PROGRAM SYMBOL INFORMATION FOR BEING USED FOR THE SOURCE BROWSER OF THE PROGRAMMER'S WORKBENCH. THIS FILE OF INFORMATION HAS THE NAME SPECIFIED BY THE FILENAME ARGUMENT.

    IF NO NAME IS SPECIFIED, IT HAS THE SAME NAME AS THE SOURCE FILE WITH AN .SBR FILENAME EXTENSION. THE FILE CONTAINS INFORMATION ABOUT THE DEFINITIONS AND REFERENCES TO ALL THE GLOBAL SYMBOLS. THIS OPTION IT'S ONLY FOR THE QBASIC EXTENDED.
/FBX [FILENAME]
    EXTENDED BROWSE INFORMATION. GENERATES A FILE CONTAINING EXTENDED PROGRAM SYMBOL INFORMATION FOR BEING USED FOR THE SOURCE BROWSER OF THE PROGRAMMER'S WORKBENCH. THIS INFORMATION FILE HAS THE NAME SPECIFIED BY THE FILENAME ARGUMENT.

    IF NO NAME IS SPECIFIED, IT HAS THE SAME NAME AS THE SOURCE FILE WITH AN .SBR FILENAME EXTENSION. THE FILE CONTAINS INFORMATION ABOUT THE DEFINITIONS AND REFERENCES TO ALL THE GLOBAL AND LOCAL SYMBOLS. THIS OPTION IT'S ONLY FOR THE QBASIC EXTENDED.
/FPA
    ALTERNATE MATHEMATICS PACK. CAUSES YOUR PROGRAM TO USE THE ALTERNATE-MATH LIBRARY FOR THE FLOATING-POINT (FP) OPERATIONS. THIS OPTION IT'S ONLY FOR THE QBASIC EXTENDED OR THE VISUAL BASIC PRO.
/FPI
    80X87 OR EMULATOR MATHEMATICS PACK. CAUSES THE COMPILER TO GENERATE IN-LINE INSTRUCTIONS FOR BEING USED IN THE FLOATING-POINT (FP) OPERATIONS. THIS OPTION IT'S ONLY FOR THE QBASIC EXTENDED.
/FS
    ENABLES THE FAR STRINGS IN THE USER PROGRAMS. THIS OPTION IT'S ONLY FOR THE QBASIC EXTENDED.
/G2
    CODE GENERATION FOR 286. ENABLES 80286-SPECIFIC INSTRUCTIONS. IT PRODUCES SMALLER AND FASTER EXECUTABLES. THIS OPTION IT'S ONLY FOR THE QBASIC EXTENDED OR THE VISUAL BASIC PRO.
/G3
    IT PRODUCES CODE GENERATION FOR 386. IT MAKES SMALLER AND FASTER EXECUTABLES. THIS OPTION IT'S ONLY FOR THE VISUAL BASIC PRO.
/H[ELP]
    DISPLAYS ONLINE HELP FOR THE COMPILER SYNTAX AND OPTIONS. THIS OPTION IT'S ONLY FOR THE QBASIC EXTENDED. THE PROGRAM QUICKHELP, ONLY INCLUDED IN THE QBASIC EXTENDED, IT'S FOR READING ALL THE MS-DOS HELP FILES IN THE SAME DIRECTORY, PRIMARILY C:\QH.

    WHEN THE SCREEN HELP OPTIONS, /H AND /HELP, OF THE PDS BASIC COMPILER ARE CALLED WHEN THE EXECUTABLE QH.EXE IT'S IN THE SAME DIRECTORY, ANYWHERE IN THE DISK, THE PROGRAM QUICKHELP IT IS OPENED TO BE CONSULTED.
/IB:NUMBER
    SETS THE MINIMUM NUMBER OF BUFFERS TO BE USED BY THE ISAM. THE ISAM DEFAULTS TO 6 BUFFERS FOR THE REDUCED FUNCTIONALITY (PROISAM) AND 9 FOR THE FULL FUNCTIONALITY (PROISAMD). THE MAXIMUM ALLOWABLE VALUE IS 512. THIS OPTION IT'S ONLY FOR THE QBASIC EXTENDED OR THE VISUAL BASIC PRO.
/IE:NUMBER
    SETS THE AMOUNT OF EXPANDED MEMORY, IN KILOBYTES, TO LEAVE FOR THE NON-ISAM USE WHEN YOU ARE WORKING WITH THE ISAM. IF OMITTED, ALL THE EXPANDED MEMORY (UP TO ABOUT 1.2 MEGABYTES) IS USED BY THE ISAM. A VALUE OF –1 INDICATES THAT THE ISAM SHOULD NOT USE THE EXPANDED MEMORY. THIS OPTION IT'S ONLY FOR THE QBASIC EXTENDED OR THE VISUAL BASIC PRO.
/II:NUMBER
    SPECIFIES THE NUMBER OF NON-NULL ISAM INDEXES USED IN A PROGRAM. IF OMITTED, THE DEFAULT IS 30, WHICH IS THE MINIMUM VALUE. THE MAXIMUM ALLOWABLE VALUE IS 500. THIS OPTION IT'S ONLY FOR THE QBASIC EXTENDED OR THE VISUAL BASIC PRO.
/LP
    CREATES A PROTECTED-MODE OBJECT FILE; IT'S THE THE DEFAULT IF YOU ARE RUNNING THE BASIC COMPILER FROM A SESSION OF OS/2 PROTECTED-MODE. THIS OPTION IT'S ONLY FOR THE QBASIC EXTENDED.
/LR
    CREATES A REAL-MODE OBJECT FILE; IT'S THE THE DEFAULT IF YOU ARE RUNNING THE BASIC COMPILER FROM MS-DOS OR A SESSION OF OS/2 REAL-MODE. THIS OPTION IT'S ONLY FOR THE QBASIC EXTENDED.
/MBF
    SUPPORT MS BINARY FORMAT NUMBERS. ALLOWS YOUR BASIC PROGRAM TO READ AND WRITE FLOATING-POINT VALUES STORED IN MICROSOFT BINARY FORMAT. THE INTRINSIC FUNCTIONS MKS$, MKD$, CVS, AND CVD ARE CONVERTED TO MKSMBF$, MKDMBF$, CVSMBF, AND CVDMBF, RESPECTIVELY. MBF IT MEANS MICROSOFT BINARY FORMAT.
/O
    COMPILE TO STAND-ALONE EXECUTABLE (.EXE). SUBSTITUTES THE DEFAULT STAND-ALONE LIBRARY FOR THE DEFAULT RUN-TIME LIBRARY. CREATES A STAND-ALONE EXECUTABLE FILE THAT CAN BE RUN WITHOUT A QBASIC RUN-TIME MODULE.
/OT
    QUICK CALL OPTIMIZATION. OPTIMIZES EXECUTION SPEED FOR SUB AND FUNCTION PROCEDURES, AND DEF FN STATEMENTS IF CERTAIN CONDITIONS ARE MET. (FOR CONDITIONS, SEE THE MICROSOFT BASIC PROGRAMMER'S GUIDE). /OT IT MEANS OPTIMIZATION.
/R
    STORES THE ARRAYS IN A ROW-MAJOR ORDER. THE QBASIC NORMALLY STORES THE ARRAYS IN A COLUMN-MAJOR ORDER.
/S
    DISABLES THE STRING COMPRESSION. WRITES THE STRINGS QUOTED TO THE OBJECT FILE INSTEAD OF THE SYMBOL TABLE. USE THIS OPTION WHEN AN OUT OF MEMORY ERROR MESSAGE OCCURS IN A PROGRAM THAT HAS MANY STRING CONSTANTS.
/T
    TERSE: NO COMPILER WARNINGS. SUPPRESSES WARNINGS GIVEN BY THE COMPILER. BY DEFAULT, THE INTERPRETER PASSES THIS OPTION TO THE BASIC COMPILER WHEN YOU SELECT MAKE EXE FILE FROM THE ENVIRONMENT. ONLY WILL GIVE YOU THE IMPORTANT WARNINGS.
/V
    ON EVENT CHECK EACH STATEMENT. ENABLES EVENT TRAPPING FOR THE COMMUNICATIONS (COM), THE LIGHTPEN (PEN), THE JOYSTICK (STRIG), THE TIMER (TIMER), THE MUSIC BUFFER (PLAY), THE FUNCTION KEYS (KEY), THE OS/2 SIGNAL EVENTS (SIGNAL), AND THE USER-DEFINED EVENTS (UEVENT). IT CHECKS BETWEEN EACH BASIC STATEMENT FOR THE EVENTS.
/W
    ON EVENT CHECKS EACH LABEL. IT ENABLES EVENT TRAPPING FOR THE SAME STATEMENTS AS /V, BUT CHECKS AT EACH LINE NUMBER OR LABEL FOR THE OCCURRENCE OF AN EVENT. THIS WAY THE OPTION /W CHECKS LESS FREQUENTLY THAN THE OPTION /V.
/X
    ENABLES THE RESUME NEXT SUPPORT. SPECIFIES THE PRESENCE OF ON ERROR STATEMENTS WITH RESUME, RESUME NEXT, OR RESUME 0. ALSO SEE THE OPTION /E IN THIS LIST.
/Z
    PWB-STYLE ERROR MESSAGES. PRODUCES A LISTING OF COMPILE-TIME ERRORS IN A FORM READABLE BY THE M EDITOR. IF IT IS USED WHEN COMPILING WITHIN M, THE /Z ALLOWS YOU TO LOCATE AND SCROLL THROUGH ERRORS IN YOUR SOURCE AND INCLUDE FILES BY INVOKING THE NXTMSG EDITOR FUNCTION. THIS OPTION IT'S ONLY FOR THE QBASIC EXTENDED.
/ZD
    LIMITED CODEVIEW INFORMATION. IT PRODUCES AN OBJECT FILE CONTAINING LINE-NUMBER RECORDS FOR DEBUGGING PURPOSES CORRESPONDING TO THE LINE NUMBERS OF THE SOURCE FILE.

    NAME OF THE PROCEDURE AND LIMITED INFORMATION OF THE VARIABLE NAME; THE CODE MODULES AND FORMS COMPILED WITH THE /ZD FIRSTLY MUST BE SAVED IN ASCII FORMAT. THIS OPTION IT'S NOT INTENDED FOR THE QBASIC 4.5.
/ZI
    FULL CODEVIEW INFORMATION. ADDS DEBUGGING INFORMATION TO THE OBJECT FILE THAT CAN BE USED BY THE MICROSOFT CODEVIEW DEBUGGER. PRODUCES OBJECT FILE CONTAINING LINE-NUMBER.

    PROCEDURE NAME, AND LIMITED VARIABLE NAME INFORMATION; FORM AND CODE MODULES COMPILED WITH /ZI MUST FIRST BE SAVED IN ASCII FORMAT. THIS OPTION IT'S NOT INTENDED FOR THE QBASIC 4.5.
FOR MORE INFORMATION ABOUT ALL THESE OPTIONS AND HOW TO WORK THEM YOU CAN CONSULT THE PROGRAMMER'S GUIDE OF THE QBASIC 7.1, CHAPTER 16, COMPILING WITH BC.

( T O P )