Qbasic
Qbasic
Qbasic
DOC File
Release Notes for Microsoft (R) BASIC Professional Development System
Version 7.10
(C) Copyright Microsoft Corporation, 1990
Product Serial Number: 00-007-2710-00007050
This document contains release notes for version 7.10 of the Microsoft (R)
BASIC Professional Development System for MS-DOS (R) and the Microsoft
Operating System/2 (MS(R) OS/2). The information in this document is more
up-to-date than that in the manuals.
This version of BASIC contains the "BASIC Language Reference" and
"Programmer's Guide" published with the previous release of the product,
version 7.0. The information in those manuals is current with this
release except where noted in this document. The "Getting Started" manual
explains the features new to version 7.1 in Chapter 1, "New Features."
Microsoft revises its languages documentation at the time of reprinting,
so some of the information in this online file may already be included in
your manuals.
=======================================================================
Contents
=======================================================================
Part
----
Description
-----------
=======================================================================
Part 1: Notes and Tips
=======================================================================
Quick Library Compatibility Between Versions
-------------------------------------------Quick libraries created with version 7.1 that use the LBOUND or UBOUND
functions or the ERASE statement on a dynamic array whose elements include
a record containing a static array will not work with version 7.0 of QBX.
Compatibility with Novell Netware
----------------------------------If you have a peripheral (such as a mouse) that uses Interrupt Request
Level (IRQ) 3, and your system is part of a network using Novell (R) Netware
version 2.15 or earlier, your system may hang when you load QBX, PWB, or
CodeView. As a temporary solution, set your peripheral to use another
interrupt. For more information, contact your Novell Netware dealer.
PWB State Files / Help Under OS/2
---------------------------------
Do not directly edit PWB state files (such as CURRENT.STS). To change editor
settings in PWB, choose Editor Settings from the Options menu. For more
information, see the section "Customizing the Environment" in Chapter 4 of
"Getting Started."
MSHELP.DLL must be located in the path set by LIBPATH in your CONFIG.SYS
file in order to use Help in PWB under OS/2.
NMK Utility
----------The NMK utility (NMK.COM) should not be used within PWB. To get help on
NMK, type QH NMK from the command line.
ILINK and BIND Utilities
-----------------------Documentation for the ILINK and BIND utilities is included online for
compatibility with Microsoft C. These utilities are not included with
Microsoft BASIC and are not supported by BASIC.
I/O within LPRINT, PRINT #, PRINT # USING, WRITE, and WRITE USING
----------------------------------------------------------------If you use any of these output statements with an argument that is,
itself, an input/output statement, the output will go to the
console screen rather than the expected file or device. To avoid this
problem, use a variable to get input, and use that variable as the
argument to the statement that will perform the output. In the following
example output will always go to the screen:
OPEN "Test1.dat" FOR INPUT AS #1
OPEN "Test2.dat" FOR OUTPUT as #2
PRINT #2, INPUT$(10, #1)
The following rewritten example will send output to the proper place:
OPEN "Test1.dat" FOR INPUT AS #1
OPEN "Test2.dat" FOR OUTPUT AS #1
TEXT$ = INPUT$(10, #1)
PRINT #2, TEXT$
Output is also sent to the screen if you use an argument that is a
user-defined function that also performs input/output. You must not
use user-defined functions that perform I/O as arguments to any of the
preceding output statements.
Debugging Custom Run-Time Modules with CodeView
-----------------------------------------------You can debug custom run-time modules with CodeView only in protected mode
(CVP.EXE). To do this you must prepare the run-time module as follows:
1. Compile the source files using the CodeView options (/Zi or /Zd).
2. Set the LINK environment variable to include the /CO (CodeView) option.
3. Run the BUILDRTM utility to create the custom run-time module.
After you run BUILDRTM, you should set the LINK environment variable back to
its original setting.
References to Version Numbers in Filenames
------------------------------------------
The references to the filenames for the BASIC run-time libraries and runtime modules in the "BASIC Language Reference" and "Programmer's Guide"
include the 7.0 version number, e.g. BRT70ENR.LIB. Change these to include
the 7.1 version number, e.g. BRT71ENR.LIB.
=======================================================================
Part 2: Notes for "Microsoft BASIC Language Reference"
=======================================================================
Page
----
Section\Note
------------
31-32
37
CHAIN
----Under DOS 2.1, CHAIN will not work unless filespec$ provides a
path. Also under DOS 2.1, if the run-time module is in the
root directory, the root directory must be listed in the PATH
environment variable.
40
CHDIR
----Refer to the online Help for CHDIR for a more appropriate
example of CHDIR and MKDIR usage.
61
COMMAND$
-------The fifth line from the top of the page is missing a pair of
parentheses. The line should read:
SUB Comline (NumArgs, Args$(), MaxArgs) STATIC
68
CONST
----You cannot use ASCII 01 and 02 in string constants if you are
going to compile to an executable program. The compiler
(BC.EXE) uses ASCII 1 and 2 internally to represent
End-of-Statement and End-of-Line, respectively. You can,
however, still use 1 and 2 within the QBX environment.
84
DATA
---You cannot use ASCII 01 and 02 in data strings if
you are going to compile to an executable program.
93
116
END
--Syntax 2, END [n%], accepts a range of integers from -32,768
through 32,767, inclusive.
144
FUNCTION
-------In version 7.1, BASIC supports the use of the BYVAL keyword
in CALL, DECLARE, SUB, and FUNCTION statements for BASIC
procedures. See the entry for page 31 for more information.
147
151
GET (Graphics)
-------------Screen modes 3 and 4 should be added to the table at the top of
the page. Both modes use one bit per pixel per plane and have
one plane.
177
KEY (Assignment)
---------------The KEY n%, stringexpression$ syntax can also be used to
create user-defined keys. Refer to the information on page 180
for specific details on how this is accomplished.
The description for the KEY ON statement in the table in the
middle of the page should mention that only the first five
characters of the soft-key string value are displayed for
function key F10.
180
181
Code
---133
134
200
LOCK...UNLOCK
------------The paragraph after the warning incorrectly states that BASIC
may generate the error "Bad record number" if you attempt to
access a file that is locked. BASIC will generate only the
"Permission denied" error message in this case.
238-239
OPEN COM
-------Under OS/2, specifying DS0 to ignore the state of the Data Set
Ready (DSR) line does not work properly. In this case, you
will have to either not ignore the DSR line or you will have
to jumper the DSR line to an active high-signal line. Refer to
serial port information that specifically pertains to your
hardware, and perform any modifications at your own risk.
The range for the parity argument should include the value PE.
Setting parity to PE enables parity error checking.
261
PLAY (Music)
-----------The remarks should note that the PLAY statement generates an
"Illegal Function Call" error if you attempt to use the
enharmonic notes C-, B+, E+ or F-.
275
PRINT USING
----------The syntax for the PRINT USING statement should be as follows:
PRINT USING formatstring$; expressionlist [;]
The PRINT USING statement does not use print zones. You cannot
replace the optional semicolon with a comma.
280
333
SETMEM Function
--------------The example shows using the C malloc() and free() functions to
allocate and free memory. These will take the allocated memory
SOUND
----The duration argument accepts any positive single-precision,
floating-point value between 0 and 65,535, inclusive.
368-375
SUB
--In version 7.1, BASIC supports the use of the BYVAL keyword
in CALL, DECLARE, SUB, and FUNCTION statements for BASIC
procedures. See the online Help for this statement for more
information.
409
WIDTH
DATESERIAL
---------Change the paragraph that begins "For each of the three
arguments..." to read as follows:
When converting specific dates, the ranges shown above for each
of the arguments should be used. However, when using expressions
to calculate date serial numbers for relative dates (e.g., a
week from 10 Dec 89) each of the three arguments can be any
valid integer as long as the resulting date serial number
is between -53,688 and 65,380, inclusive. Date serial
numbers outside this range generate the error message "Illegal
function call."
506
518
Fonts Toolbox
------------Change the first sentence in the second paragraph to read as
follows:
Nine font files are supplied: Courier fonts in COURA.FON,
COURB.FON, and COURE.FON, Helv fonts in HELVA.FON,
HELVB.FON, and HELVE.FON, and Tms Rmn fonts in TMSRA.FON,
TMSRB.FON and TMSRE.FON.
523
Fonts Toolbox
------------Add the following documentation for the GTextWindow before
existing documentation for GetTotalFonts:
GTextWindow SUB
Action
Syntax
Remarks
Description
-----------
x1
y1
x2
y2
Scrn%
Fonts Toolbox
------------Change the last line of the LoadFont% FUNCTION section to read:
l% = LoadFont%("n1/n3/n6")
549
550
586
601
606
608-610
BUILDRTM Utility
---------------The run-time argument to BUILDRTM should not include a path or
a file extension.
620
NMAKE
----Change the description for the macrodefinitions argument to
the following:
An optional field that lists macro definitions for NMAKE to
639
653
656
665
684
690
Section/Note
------------
41
Defining Procedures
------------------The DATA statement should be added to the list of statements
and expressions not allowed within a procedure.
56
66
68
224
Presentation Graphics
--------------------Table 6.1 should indicate that the Presentation Graphics toolbox
can only be used in real mode.
250-251
AxisType
ISAM Support
-----------The Note on this page indicates that ISAM is not supported
under OS/2. With version 7.1 this restriction has been
removed.
341
Restrictions on Indexing
-----------------------Add the following to the end of the first paragraph:
The maximum number of indexes per table is 28.
344
345
376
393
394
Repair Utility
-------------Replace the paragraph that begins, "When you use the ISAMREPR
utility..." with the following:
The ISAMREPR utility requires an additional 32K within your
database to re-create the system indexes. This adds a least
32K to the size of the database. Do not run the utility if
your disk does not have this amount of space available in the
current working directory. Also note that the maximum size of
a database is 128 megabytes. When you run the ISAMREPR
utility, adding 32K to the size of an extremely large database
may cause it to exceed the maximum allowed. ISAMREPR deletes
inconsistent records in tables, but does not compact after
doing so. Compacting a database is described in the next
section.
490-497
String-Processing Routines
-------------------------Sample MASM code in this section includes lines like
the following:
extrn stringassign: proc far
call stringassign
In all cases, only "far" should appear after the colon in the
extrn directive. In addition, all extrn directives should appear
outside of any .CODE or .DATA segment directives. For an
example, see the entry for pages 368-375 of the "BASIC Language
Reference."
494
539
558-560
561
576
Options
------Replace /NOD with /NOE in the table at the top of the page.
589
599
611
624
625
636
Description Blocks
-----------------The following information applies to the command component
of description blocks:
The first character after a dependency line in a description
block must be a whitespace character, i.e., either a space or
a tab. An error occurs if only a carriage return is used on a
blank line.
663
OBJECTS Directive
----------------This section should note that you should not include the
OVLDOS21.OBJ or NOEMS.OBJ stub files in the list of filenames
after the OBJECTS directive.
701
702
707