home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / basic / readme.doc < prev    next >
Encoding:
Text File  |  1989-11-09  |  22.9 KB  |  692 lines

  1.  
  2.                 README.DOC File
  3.  
  4.      Release Notes for Microsoft (R) BASIC Professional Development System
  5.  
  6.                   Version 7.00
  7.  
  8.             (C) Copyright Microsoft Corporation, 1989
  9.  
  10.  
  11.     This document contains release notes for Version 7.00 of the Microsoft (R)
  12.     Professional Development System for MS-DOS (R) and the Microsoft Operating
  13.     System/2 (MS(R) OS/2). The information in this document is more up-to-date
  14.     than that in the manuals.
  15.  
  16.     Microsoft improves its languages documentation at the time of reprinting,
  17.     so some of the information in this online file may already be included in
  18.     your manuals.
  19.  
  20.     =======================================================================
  21.     ===                                    ===
  22.     ===                    Contents                ===
  23.     ===                                    ===
  24.     =======================================================================
  25.  
  26.     This file has 5 parts.
  27.  
  28.  
  29.     Part    Description
  30.     ----    -----------
  31.  
  32.      1    Notes for "Microsoft BASIC Getting Started"
  33.  
  34.      2    Notes for "Microsoft BASIC Language Reference"
  35.  
  36.      3    Notes for "Microsoft BASIC Programmer's Guide"
  37.  
  38.      4    Notes for "Microsoft CodeView and Utilities User's Guide"
  39.  
  40.      5    Miscellaneous Notes and Tips
  41.  
  42.  
  43.     =======================================================================
  44.     ===                                    ===
  45.     === Part 1: Notes for "Microsoft BASIC Getting Started"        ===
  46.     ===                                    ===
  47.     =======================================================================
  48.  
  49.  
  50.     The following notes refer to specific pages in "Microsoft BASIC Getting
  51.     Started."
  52.  
  53.     Page    Section\Note
  54.     ----    ------------
  55.  
  56.      v        Distribution of Run-Time Modules
  57.         --------------------------------
  58.  
  59.         Add the following to the list of run-time modules that may be
  60.         distributed under the terms and conditions of the Microsoft
  61.         License Agreement:
  62.  
  63.         COURA.FON  COURE.FON  COURB.FON     HELVA.FON  HELVE.FON
  64.         TMSRA.FON  TMSRE.FON
  65.  
  66.  
  67.      9        How Setup Uses Stub Files
  68.         -------------------------
  69.  
  70.         Replace the first sentence with the following:
  71.  
  72.         You can use stub files for programs that use the BRT module, or
  73.         for stand-alone programs.  However, Setup only uses stub files
  74.         to build the BRT module.  If you want to remove functionality
  75.         for stand-alone programs, you must specify a given stub file on
  76.         the LINK command line.
  77.  
  78.  
  79.     =======================================================================
  80.     ===                                    ===
  81.     === Part 2: Notes for "Microsoft BASIC Language Reference"        ===
  82.     ===                                    ===
  83.     =======================================================================
  84.  
  85.  
  86.     The following notes refer to specific pages in "Microsoft BASIC
  87.     Language Reference."
  88.  
  89.     Page    Section\Note
  90.     ----    ------------
  91.  
  92.      37        CHAIN
  93.         -----
  94.  
  95.         Under DOS 2.1, CHAIN will not work unless filespec$ provides a
  96.         path. Also under DOS 2.1, if the run-time module is in the
  97.         root directory, the root directory must be listed in the PATH
  98.         environment variable.
  99.  
  100.  
  101.      40        CHDIR
  102.         -----
  103.  
  104.         Refer to the online Help for CHDIR for a more appropriate
  105.         example of CHDIR and MKDIR usage.
  106.  
  107.  
  108.      68        CONST
  109.         -----
  110.  
  111.         You cannot use ASCII 01 and 02 in string constants if you are
  112.         going to compile to an executable program. The compiler
  113.         (BC.EXE) uses ASCII 1 and 2 internally to represent
  114.         End-of-Statement and End-of-Line, respectively. You can,
  115.         however, still use 1 and 2 within the QBX environment.
  116.  
  117.  
  118.      84        DATA
  119.         ----
  120.  
  121.         You cannot use ASCII 01 and 02 in data strings if
  122.         you are going to compile to an executable program.
  123.         See the preceding note for CONST.
  124.  
  125.  
  126.     116        END
  127.         ---
  128.  
  129.         Syntax 2, END [n%], accepts a range of integers from -32768
  130.         through 32767, inclusive.
  131.  
  132.  
  133.     177        KEY
  134.         ---
  135.  
  136.         The KEY n%, stringexpression$ syntax can also be used to
  137.         create user-defined keys. Refer to the information on page 180
  138.         for specific details on how this is accomplished.
  139.  
  140.  
  141.     181        KeyBoard Scan Codes
  142.         -------------------
  143.  
  144.         Add the following to the Keyboard Scan Code chart:
  145.  
  146.             Key        Code
  147.             ---        ----
  148.             F11         87
  149.             F12         88
  150.  
  151.  
  152.     188        LEN
  153.         ---
  154.  
  155.         When passing a string length as an argument to a procedure that
  156.         may change the value of the argument, ensure that it is
  157.         passed by value instead of by reference, which is the BASIC
  158.         default. Do this by placing parentheses around LEN(N$), e.g.,
  159.         (LEN(N$)). Alternatively, you can use a temporary variable,
  160.         e.g. N% = LEN(N$), and pass the temporary variable in the
  161.         standard way. Failure to use these techniques will corrupt
  162.         string space if you change the value of the passed argument.
  163.  
  164.  
  165.     238        OPEN COM
  166.         --------
  167.  
  168.         Under OS/2, specifying DS0 to ignore the state of the Data Set
  169.         Ready (DSR) line, does not work properly. In this case, you
  170.         will have to either not ignore the DSR line or you will have
  171.         to jumper the DSR line to an active high signal line. Refer to
  172.         serial port information that specifically pertains to your
  173.         hardware, and perform any modifications at your own risk.
  174.  
  175.  
  176.     345        SOUND
  177.         -----
  178.  
  179.         The duration argument accepts any positive single-precision,
  180.         floating-point value between 0 and 65535, inclusive.
  181.  
  182.  
  183.     425        DATESERIAL
  184.         ----------
  185.  
  186.         Change the paragraph that begins "For each of the three
  187.         arguments..." to read as follows:
  188.  
  189.         When converting specific dates, the ranges shown above for each
  190.         of the arguments should be used. However, when using expressions
  191.         to calculate date serial numbers for relative dates (e.g., a
  192.         week from 10 Dec 89) each of the three arguments can be any
  193.         valid integer as long as the resulting date serial number
  194.         is between -53688 and 65380, inclusive. Date serial
  195.         numbers outside this range generate the error message "Illegal
  196.         function call."
  197.  
  198.  
  199.     518        Fonts Toolbox
  200.         -------------
  201.  
  202.         Change the first sentence in the second paragraph to read as
  203.         follows:
  204.  
  205.         Nine font files are supplied:  Courier fonts in COURA.FON,
  206.         COURB.FON, and COURE.FON, Helvetica fonts in HELVA.FON,
  207.         HELVB.FON, and HELVE.FON, and Times Roman fonts in TMSRA.FON,
  208.         TMSRB.FON and TMSRE.FON.
  209.  
  210.  
  211.     523        Fonts Toolbox
  212.         -------------
  213.  
  214.         Add the following documentation for the GTextWindow before
  215.         existing documentation for GetTotalFonts:
  216.  
  217.         GTextWindow SUB
  218.  
  219.         Action        Retains the logical coordinates of window
  220.                 boundaries. (See note below.)
  221.  
  222.         Syntax        GTextWindow (x1, y1, x2, y2, Scrn%)
  223.  
  224.         Remarks        The GTextWindow procedure uses the following
  225.                 arguments:
  226.  
  227.                 Argument        Description
  228.                 --------        -----------
  229.  
  230.                    x1        Integer containing the minimum
  231.                         X value  (logical coordinate).
  232.  
  233.                    y1        Integer containing the minimum
  234.                         Y value.
  235.  
  236.                    x2        Integer containing the maximum
  237.                         X value.
  238.  
  239.                    y2        Integer containing the maximum
  240.                         Y value.
  241.  
  242.                   Scrn%        Integer containing either cTRUE
  243.                         (used with WINDOW SCREEN statement
  244.                         to show window Y values increase
  245.                         top to bottom) or cFALSE (used
  246.                         with WINDOW statement to show
  247.                         window Y values increase bottom to
  248.                         top )
  249.  
  250.                 This procedure should be called after defining
  251.                 VIEW and WINDOW and prior to calling OutGText.
  252.  
  253.                 To clear the current window, call this routine
  254.                 with X1=X2 or Y1=Y2.
  255.  
  256.                 Note: The first call to OutGtext will work without
  257.                 calling GTextWindow, however all subsequent calls
  258.                 treat the coordinates as pixel coordinates of the
  259.                 window; therefore, to retain the logical
  260.                 coordinates call GTextWindow prior to calling
  261.                 OutGText.
  262.  
  263.         See Also    See OutGText statement for more information.
  264.  
  265.  
  266.     601        Keyboard Scan Codes and ASCII Character Codes
  267.         ---------------------------------------------
  268.  
  269.         Add the following to the table on page 601:
  270.  
  271.            |       |        |  ASCII or  |    ASCII or  |  ASCII or
  272.            |  Scan |  ASCII or    |  Extended  |    Extended  |  Extended
  273.         Key|  Code |  Extended    |  with SHIFT|    with CTRL |  with ALT
  274.         ---|-------|------------|------------|------------|------------
  275.            |Dec|Hex|Dec|Hex|Char|Dec|Hex|Char|Dec|Hex|Char|Dec|Hex|Char
  276.         ---|---|---|---|---|----|---|---|----|---|---|----|---|---|----
  277.         F11| 87| 57|133| 85| NUL|135| 87| NUL|137| 89| NUL|140| 8B| NUL
  278.         F12| 88| 58|134| 86| NUL|136| 88| NUL|138| 8A| NUL|141| 8C| NUL
  279.         ---------------------------------------------------------------
  280.  
  281.  
  282.     611        BUILDRTM Utility
  283.         ----------------
  284.  
  285.         The runtime argument to BUILDRTM should not include a path or
  286.         a file extension.
  287.     
  288.  
  289.     620        NMAKE
  290.         -----
  291.  
  292.         Change the description for the macrodefinitions argument to
  293.         the following:
  294.  
  295.         An optional field that lists macro definitions for NMAKE to
  296.         use. Macros can also be specified in the makefile. See the
  297.         "Macro Definitions" section for details.
  298.  
  299.  
  300.     665        Run-Time Error Message - Overflow
  301.         ----------------------------------
  302.  
  303.         In the first bulleted item, change "40 indices" to "28
  304.         indexes". Entirely remove the sentence that begins, "If there
  305.         are 32 open tables..." This limitation is not correct and does
  306.         not cause an Overflow error. See "Using Multiple Files:
  307.         'Relational Databases'" in Chapter 10 of the Programmer's Guide
  308.         for information on open table limitations.
  309.  
  310.  
  311.     684        Link error L1083 - Cannot open run file
  312.         -------------------------------------
  313.  
  314.         This error can also be caused by a read-only .EXE file of the
  315.         same name as specified for the run file. Link will not be able
  316.         to overwrite the read-only file.
  317.  
  318.  
  319.     =======================================================================
  320.     ===                                    ===
  321.     === Part 3: Notes for "Microsoft BASIC Programmer's Guide"        ===
  322.     ===                                    ===
  323.     =======================================================================
  324.  
  325.  
  326.     The following notes refer to specific pages in "Microsoft BASIC
  327.     Programmer's Guide.:
  328.  
  329.  
  330.     Page    Section/Note
  331.     ----    ------------
  332.  
  333.     341        Restrictions on Indexing
  334.         ------------------------
  335.  
  336.         Add the following to the end of the first paragraph:
  337.  
  338.         The maximum number of indexes per table is 28.
  339.  
  340.  
  341.     344        Setting the Current Record by Position
  342.         --------------------------------------
  343.  
  344.         Add the following just after the paragraph that begins,
  345.         "The effect of any of the MOVEdest statements...":
  346.  
  347.         If you trap errors while using either a MOVENEXT or
  348.         MOVEPREVIOUS ISAM statement, and an I/O error occurs (either
  349.         57 or 71) on an index that is not the NULL index, you must
  350.         resynchronize ISAM internal pointers before using another
  351.         MOVENEXT or MOVEPREVIOUS statement. Synchronization can be
  352.         done using any valid SETINDEX statement, either a MOVEFIRST or
  353.         MOVELAST statement, or any of the SEEKxx (SEEKEQ, SEEKGE,
  354.         SEEKGT) statements.
  355.  
  356.  
  357.     345        A Typical ISAM Program
  358.         ----------------------
  359.  
  360.         The command line used for invoking PROISAM for use with the
  361.         BOOKLOOK program (shown halfway down the page) is stated as
  362.         PROISAM /Ib:24. The efficiency of the ISAM has improved and
  363.         the program can now be run in 640K conventional memory, with
  364.         no expanded memory, with only 9 buffers: PROISAM /Ib:9. If you
  365.         have EMS available, you need not specify the /Ib option.
  366.  
  367.  
  368.     376        Starting ISAM for Use in QBX - /Ie argument
  369.         -------------------------------------------
  370.  
  371.         The explanation for the /Ie: option for the ISAM TSR states
  372.         that "...In practice, you only need to specify /Ie if your
  373.         program code (or a loaded Quick library) actually manages EMS
  374.         memory." Although this is true, there may be other times when
  375.         you want to reserve EMS for other uses. Having many ISAM
  376.         buffers improves the performance of ISAM, but during program
  377.         development ISAM performance may be less important than the
  378.         size of your program's source code. For example, your program
  379.         may only need 10-12 ISAM buffers to prevent an "Out of memory"
  380.         error at run time. However, with a very large program, the
  381.         size of the source code loaded in QBX may result in an "Out of
  382.         memory" error. If you have 1.2 megabytes of EMS available, you
  383.         can use the /Ie: option to minimize the EMS used by ISAM
  384.         buffers, reserving the rest for program source code. For
  385.         example, if your program needs about 10 buffers, you can
  386.         invoke the ISAM TSR with /Ie:900. This will provide several
  387.         hundred K of EMS to be used for ISAM buffers. The rest will be
  388.         reserved for QBX (and your program source code). Note that
  389.         only program parts whose size is between 512 bytes and 16K are
  390.         placed in EMS by QBX. You can check the sizes of your
  391.         procedures and module-level code blocks by pressing F2 to see
  392.         the View menu's SUBs dialog box.
  393.  
  394.  
  395.     393        The ISAMCVT Utility
  396.         -------------------
  397.  
  398.         Add the following sentence just before the section entitled
  399.         "The Repair Utility":
  400.  
  401.         No EMS driver can be loaded when running ISAMCVT.
  402.  
  403.  
  404.     394        Repair Utility
  405.         --------------
  406.  
  407.         Replace the paragraph that begins, "When you use the ISAMREPR
  408.         utility..." with the following:
  409.  
  410.         The ISAMREPR utility requires an additional 32K within your
  411.         database to re-create the system indexes.  This adds a least
  412.         32K to the size of the database. Do not run the utility if
  413.         your disk does not have this amount of space available in the
  414.         current working directory. Also note that the maximum size of
  415.         a database is 128 megabytes. When you run the ISAMREPR
  416.         utility, adding 32K to the size of an extremely large database
  417.         may cause it to exceed the maximum allowed. ISAMREPR deletes
  418.         inconsistent records in tables, but does not compact after
  419.         doing so. Compacting a database is described in the next
  420.         section.
  421.  
  422.  
  423.     495        BASIC Calling MASM
  424.         ------------------
  425.  
  426.         Change the first sentence in the paragraph following the
  427.         "Important" note to read as follows:
  428.  
  429.         This MASM code uses the .MODEL directive which establishes
  430.         compatible naming and calling conventions for BASIC, and
  431.         it also uses simplified segment directives.
  432.  
  433.  
  434.     559        Using BC Command Options - /D option
  435.         ------------------------------------
  436.  
  437.         When using the /D option with dynamic arrays, it is possible
  438.         to produce incorrect results if you pass an array element to a
  439.         procedure that changes the value of the element index. For
  440.         example, the following works properly when compiled with all
  441.         options except /D:
  442.  
  443.             CALL foo(a(i),i)
  444.             PRINT a(i), i
  445.  
  446.         The following performs the same operations and works properly
  447.         with all compile options including /D.
  448.  
  449.             j=i
  450.             CALL foo(a(i),j)
  451.             PRINT a(i), j
  452.  
  453.  
  454.     561        Using Floating-Point Options (/FPa and /FPi)
  455.         --------------------------------------------
  456.  
  457.         The new CURRENCY data type is not currently supported in the
  458.         alternate math library.
  459.  
  460.  
  461.     576        Options
  462.         -------
  463.  
  464.         Replace /NOD with /NOE in the table at the top of the page.
  465.  
  466.  
  467.     595        Ignoring Default Libraries (/NOD:filename)
  468.         ------------------------------------------
  469.  
  470.         Add the following to the paragraph that begins, "In general,
  471.         higher-level languages..."
  472.  
  473.         For example, if you specify the /NOD option when linking a
  474.         protect-mode BASIC program, you must explicitly specify the
  475.         run-time library (BRT70xxP.LIB) and OS2.LIB in the libraries
  476.         field of the LINK command line.
  477.  
  478.  
  479.     624        Mouse, Menu, and Window Libraries
  480.         --------------------------------
  481.  
  482.         If you rebuild toolbox Quick libraries, files should be
  483.         compiled with the /Ah option (allow dynamic arrays to be
  484.         greater than 64K) if you intend to use QBX with the /Ea option
  485.         (Put arrays into expanded memory).
  486.  
  487.         Also note that Table 19.1 applies to all toolbox files, not
  488.         just MOUSE.BAS, MENU.BAS, and WINDOW.BAS.
  489.  
  490.  
  491.     625        Loading and Viewing Quick Libraries
  492.         -----------------------------------
  493.  
  494.         QBX now requires that the BASIC source for any Quick library
  495.         be compiled using the /Fs (far string) compiler option.
  496.         Consequently, QBX will not permit you to load a Quick library
  497.         file that has the near string features of earlier versions of
  498.         QuickBASIC. If you encounter an "Invalid Format" error when
  499.         attempting to load an older Quick library file, you should
  500.         recompile the files using BC with the /Fs option.
  501.  
  502.         You may also encounter the "Invalid Format" error if you
  503.         invoke QBX with a /Ea option (put arrays into expanded memory)
  504.         and have not compiled the Quick library with /D (generate
  505.         debugging code) or /Ah (Allow dynamic arrays of records,
  506.         fixed-length strings, and numeric data to be larger than 64K).
  507.  
  508.  
  509.     636        Description Blocks
  510.         ------------------
  511.  
  512.         The following information applies to the command component
  513.         of description blocks:
  514.  
  515.         The first character after a dependency line in a description
  516.         block must be a whitespace character, i.e., either a space or
  517.         a tab. An error occurs if only a carriage return is used on a
  518.         blank line.
  519.  
  520.  
  521.     701        Elementary Data Types - String
  522.         ------------------------------
  523.  
  524.         You cannot use ASCII 01 and 02 in strings of any form if you
  525.         are going to compile to an executable program. The compiler
  526.         (BC.EXE) uses ASCII 1 and 2 internally to represent
  527.         End-of-Statement and End-of-Line, respectively. You can,
  528.         however, still use 1 and 2 within the QBX environment.
  529.  
  530.  
  531.     702        Elementary Data Types - Numeric
  532.         -------------------------------
  533.  
  534.         A math coprocessor (80x87) handles rounding of extremely small
  535.         numbers differently from the way numbers are rounded by the
  536.         BASIC emulator math package. Because of this difference, some
  537.         numbers that are properly displayed using a coprocessor are
  538.         rounded and displayed as zero when using emulator math. The
  539.         range of single-precision floating-point numbers that are
  540.         properly displayed as input, using the emulator math package,
  541.         is +/- 2.802597E-45. For double-precision floating-point
  542.         numbers, the range is +/- 4.94065645841247D-324.
  543.  
  544.  
  545.     =======================================================================
  546.     ===                                    ===
  547.     === Part 4: Notes for "Microsoft Codeview and Utilities Users    ===
  548.     ===        Guide"                            ===
  549.     ===                                    ===
  550.     =======================================================================
  551.  
  552.  
  553.     The following notes refer to specific pages in "Microsoft CodeView and
  554.     Utilities User's Guide."
  555.  
  556.     Page    Section\Note
  557.     ----    ------------
  558.  
  559.      76        Add the following BASIC intrinsic functions to Table 4.8,
  560.         "BASIC Intrinsic Functions Supported by the CodeView Debugger":
  561.  
  562.                            Argument           Function
  563.         Name     Definition           Type           Type
  564.         -------------------------------------------------------
  565.         CCUR     Data-type conversion  Numeric           Currency
  566.         CVC     Data-type conversion  8-byte string   Currency
  567.         SADD     Offset of string      String           Integer
  568.         SSEG     Segment of string     String           Integer
  569.         SSEGADD     Far pointer of string String           Integer
  570.  
  571.         
  572.     100        Add the following format specifier to Table 6.1, "CodeView
  573.         Format Specifiers":
  574.  
  575.  
  576.                Output     Sample         Sample
  577.         Character  Format     Expression     Output
  578.         -----------------------------------------------
  579.            m      Currency    ?1.2345678, m    1.2346
  580.  
  581.  
  582.     101        Add the following note after the paragraph that begins,
  583.         "You can specify individual members..."
  584.  
  585.         -----------------------------------------------------------
  586.         Note   Individual members of a BASIC user-defined type are
  587.                displayed in reverse order from the way they are
  588.                defined within the user-defined type.
  589.         -----------------------------------------------------------
  590.  
  591.                                            
  592.     102        The last example on the page is incorrect for Codeview version
  593.         2.35. The members of a BASIC user-defined type are displayed in
  594.         reverse order. "? mystruct" should display:
  595.  
  596.             {c3 =0x1000:2d34, c2={b=2, a=1}, c1=123}
  597.  
  598.  
  599.     117        Add the following to the list of Dump commands in Section 6.4,
  600.         "Dump Commands":
  601.  
  602.         Command            Command Name
  603.         -------            ------------
  604.           DC            Dump Currency
  605.  
  606.  
  607.     133        Add the following note after the first paragraph of Section
  608.         7.1, "Breakpoint Set Command":
  609.  
  610.         -----------------------------------------------------------
  611.         Note   If the BASIC program being debugged was compiled with
  612.                the /Ot option, you cannot set a breakpoint on the line
  613.                containing a SUB, FUNCTION, DEF FN statement.  If you
  614.                do set a breakpoint there, it will be ignored by
  615.                CodeView; the program will not halt. You will be unable
  616.                to unassemble from the correct beginning address and
  617.                CodeView will not display the correct address when
  618.                issued a "?" command.
  619.         -----------------------------------------------------------
  620.  
  621.  
  622.     144        Add the following to the list of size specifiers in Section
  623.         8.2, "Setting Watch-Expression and Watch-Memory Statements":
  624.  
  625.         Specifier        Size
  626.         ---------        ----
  627.             C            Currency
  628.  
  629.  
  630.     151        Add the following to the list of size specifiers in Section
  631.         8.4, "Setting Tracepoints":
  632.  
  633.         Specifier        Size
  634.         ---------        ----
  635.             C            Currency
  636.  
  637.  
  638.     175        Add the following to the list of Enter commands in Section
  639.         10.2:
  640.  
  641.         Command            Command Name
  642.         -------            ------------
  643.           EC            Enter Currency
  644.  
  645.  
  646.     199        Add the following to the Note in Section 11.7, "Shell Escape
  647.         Command":
  648.  
  649.         If there is insufficient memory to perform a shell escape, the
  650.         resulting "Not enough memory" message is printed to the output
  651.         screen but you are returned immediately to the debug screen.
  652.         Since you will not normally see the output screen you can use
  653.         the Screen Exchange command to confirm that this is what
  654.         caused the Shell Escape to fail.
  655.  
  656.  
  657.     =======================================================================
  658.     ===                                    ===
  659.     === Part 5: Miscellaneous Notes and Tips                ===
  660.     ===                                    ===
  661.     =======================================================================
  662.  
  663.     The following notes refer to specific issues that may not conveniently
  664.     fall into any of the previous categories.
  665.  
  666.  
  667.     I/O within LPRINT, PRINT #, PRINT # USING, WRITE, and WRITE USING
  668.     -----------------------------------------------------------------
  669.  
  670.     If you use any of these output statements with an argument that is,
  671.     itself, an input/output statement, the output will go to the
  672.     console screen rather than the expected file or device. To avoid this
  673.     problem, use a variable to get input, and use that variable as the
  674.     argument to the statement that will perform the output. In the following
  675.     example output will always go to the screen:
  676.  
  677.     OPEN "Test1.dat" FOR INPUT AS #1
  678.     OPEN "Test2.dat" FOR OUTPUT as #2
  679.     PRINT #2, INPUT$(10, #1)
  680.  
  681.     The following rewritten example will send output to the proper place:
  682.  
  683.     OPEN "Test1.dat" FOR INPUT AS #1
  684.     OPEN "Test2.dat" FOR OUTPUT AS #1
  685.     TEXT$ = INPUT$(10, #1)
  686.     PRINT #2, TEXT$
  687.  
  688.     Output is also sent to the screen if you use an argument that is a
  689.     user-defined function that also performs input/output. You must not
  690.     use user-defined functions that perform I/O as arguments to any of the
  691.     above listed output statements.
  692.