home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 5.ddi / DOC.ZIP / MANUAL.BCA < prev    next >
Encoding:
Text File  |  1992-06-10  |  18.6 KB  |  570 lines

  1. User's Guide
  2. ============
  3.  Chapter 3, "Menus and options reference"
  4.  ----------------------------------------
  5.   Page 109
  6.   --------
  7.    The macros __CLASSDLL and __RTLDLL should be _CLASSDLL and _RTLDLL
  8.    (with a single underscore), respectively.
  9.  
  10.  Appendix A, "The Optimizer"
  11.  ---------------------------
  12.   Page 181
  13.   --------
  14.    The -Os entry in Table A.1 should indicate that it is the default
  15.    value for the command-line and IDE compilers.
  16.  
  17.    Also, the sentence
  18.  
  19.     "In particular, -G and -G- are -Os and -Ot, respectively."
  20.  
  21.    should read
  22.  
  23.     "In particular, -G and -G- are -Ot and -Os, respectively."
  24.  
  25.   Page 190
  26.   --------
  27.    Add the following paragraph to the Object Data section, right
  28.    before the section titled "The _fastcall modifier"
  29.  
  30.     You must compile all descendants and ancestors of a class with
  31.     Object Data if you want that hierarchy to use Object Data. For
  32.     example, if you use a class library that hasn't been compiled
  33.     using Object Data (like Turbo Vision or ObjectWindows), your
  34.     applications can still use Object Data even though those classes
  35.     don't. The compiler knows (from pragmas in the header files)
  36.     that those classes weren't compiled with Object Data and won't
  37.     try to force descendants of them to use Object Data. Classes you
  38.     define entirely within your application, on the other hand, will
  39.     use Object Data.
  40.  
  41.  
  42. Programmer's Guide
  43. ==================
  44.  Chapter 3, "C++ specifics"
  45.  --------------------------
  46.   Page 127
  47.   --------
  48.    The sample function main should be as follows:
  49.  
  50.    int main()
  51.    {
  52.      X one(10);   // invokes X::X(int) and sets integer_part to 10
  53.      X two(3.14); // invokes X::X(double) and sets double_part to 3.14
  54.    }
  55.  
  56.  Chapter 4, "The preprocessor"
  57.  -----------------------------
  58.   Page 171+
  59.   --------
  60.    There are two additional pragmas:
  61.  
  62.     #pragma codestring "string"
  63.      The specified string is emitted into the code segment;
  64.      note that no terminating null is emitted. This #pragma
  65.      is useful for embedding strings like copyright notices,
  66.      module signatures, etc. in the code segment.
  67.  
  68.     #pragma codeseg [seg-name [group-name] ["class-name"]]
  69.  
  70.      Specifies the code segment name (and optionally group
  71.      and/or class name) that function bodies following
  72.      this pragma will be emitted into. When no parameters
  73.      are given, the code segment is switched back to the
  74.      initial code segment.
  75.  
  76.   Page 175+
  77.   ---------
  78.    The predefined version macros have been updated:
  79.     __BORLANDC__    is now defined as 0x0410
  80.     __TURBOC__      is now defined as 0x0410
  81.     __BCPLUSPLUS__  is now defined as 0x0310
  82.     __TCPLUSPLUS__  is now defined as 0x0310
  83.  
  84.  Chapter 5, "Using C++ streams"
  85.  ------------------------------
  86.   Page 204
  87.   --------
  88.    The first parameter to the constructors for the class istrstream
  89.    is incorrectly specified as a const char *; it actually is a char *.
  90.  
  91.   Page 207
  92.   --------
  93.    The last sentence in the introductory paragraph to streambuf
  94.    should read:
  95.  
  96.    streambuf is a base for conbuf, filebuf, and strstreambuf.
  97.  
  98.  Chapter 6, "The container class libraries"
  99.  ------------------------------------------
  100.   Page 264
  101.   --------
  102.    The description of ContainerIterator::operator ++ should read:
  103.  
  104.    Advances the iterator one position in the container. The first
  105.    version returns the object referred to <after> incrementing;
  106.    the second version returns the object referred to <before>
  107.    incrementing. The int argument is used to distinguish between
  108.    the prefix and postfix increment operators. (See "Overloading
  109.    unary operators" on page 138 for details.)
  110.  
  111.  Chapter 8, "Building a Windows application"
  112.  -------------------------------------------
  113.   Page 321
  114.   --------
  115.   The TLINK command line should be changed to:
  116.  
  117.    tlink /Tw /v /n /c C:\BORLANDC\LIB\c0ws whello,\
  118.          whello,\
  119.          ,\
  120.          C:\BORLANDC\LIB\cws
  121.                          ^^^
  122.  
  123.  
  124.  
  125. Tools and Utilities Guide
  126. =========================
  127.  Introduction
  128.  ------------
  129.   Transfer macros, the Turbo Editor Macro Language (TEML), and
  130.   the Turbo Editor Macro Compiler (TEMC) are also documented in
  131.   the online file UTIL.DOC.
  132.  
  133.  Chapter 1, "Import library tools"
  134.  ---------------------------------
  135.   Page 7
  136.   ------
  137.    IMPLIBW does allow you to create a single import library from
  138.    multiple DLLs or module definition files. At the File Select
  139.    dialog box, you can type multiple filenames in the File edit
  140.    control. When you choose OK to make the import library,
  141.    IMPLIBW will use all the exports from each of the DLLs or
  142.    module definition files you listed. Note that you can only
  143.    select a single file using the file list box; you must type in
  144.    the filenames if you need to specify more than one.
  145.  
  146.  Chapter 2, "Make: The program manager"
  147.  --------------------------------------
  148.   Page 11
  149.   -------
  150.    In the sentence that begins "All options that do not specify a
  151.    string (-s or ±a, for example)..." the "±a" should be "-a".
  152.  
  153.   Page 33
  154.   -------
  155.    The last word of the page, "which" should be "while $<".
  156.  
  157.  Chapter 3, "TLIB: The Turbo librarian"
  158.  --------------------------------------
  159.    There is an additional TLIB command line option, /0, which is not
  160.    documented in the printed TLIB reference (Chapter 3 of the Tools &
  161.    Utilities Guide).  The /0 option instructs the Turbo Librarian to
  162.    remove all "Comment" records from the library.  Comment records are
  163.    typically used to store information used by the debugger or other
  164.    tools, and are not needed to create an executable file.  Using this
  165.    option will make your libraries (and executable programs created using
  166.    the libraries) smaller.  The /0 option is equivalent to checking
  167.    Purge Comment Records in the Options|Librarian dialog box within the IDE.
  168.  
  169.  Chapter 4, "TLINK: The Turbo linker"
  170.  --------------------------------------
  171.   Page 58
  172.   -------
  173.    Change the TLINK format description to:
  174.  
  175.     tlink C0[W|D|F]x myobjs,exe,[map],[IMPORT][mylibs][OVERLAY]
  176.     [EMU|FP87 mathx][CWx|Cx],[deffile]
  177.     ^^^^^^^^^^^^^^^^^^^^^^^^
  178.   Page 60
  179.   -------
  180.    Reverse the order of the two bullet items below:
  181.  
  182.    o CWx.LIB, the run-time library..
  183.    o if you are using floating point math, FP87.LIB...
  184.  
  185.    The math libraries should be linked before the run-time library.
  186.  
  187.  Chapter 5, "Using WinSight"
  188.  ---------------------------
  189.   The paragraph "Formatting message parameters" should be replaced
  190.   with the following two paragraphs:
  191.  
  192.    Normally, the Message Trace pane interprets each message's 
  193.    parameters and return value and displays them in a more 
  194.    easily human readable format. You can disable this by 
  195.    unchecking "Interpret Values" in the Message Trace Options
  196.    dialog box.
  197.  
  198.    The Message Trace pane usually displays information about 
  199.    the parameters and return value of a message in decimal.
  200.    Since it's sometimes more convenient to view a message's
  201.    detail in hexadecimal, you can enable hex-only interpretation
  202.    by checking "Hex Values" in the Message Trace Options
  203.    dialog box.
  204.  
  205.  Appendix A, "Error messages"
  206.  ----------------------------
  207.   Page 177
  208.   --------
  209.    MAKE and MAKER generate a new error message:
  210.     Cycle in include files: 'filename.h'
  211.     You can't recursively include files.
  212.  
  213.   Page 182
  214.   --------
  215.    In the TLINK warning "filename(linenum): Duplicate internal name
  216.    in imports," there is an extraneous right bracket that should be
  217.    removed.
  218.  
  219.   Page 192
  220.   --------
  221.    There is a new compiler warning:
  222.  
  223.     Initialization is only partially bracketed
  224.      When structures are initialized, braces can be used to mark the 
  225.      initialization of each member of the structure. If a member 
  226.      itself is an array or structure, nested pairs of braces may be 
  227.      used. This ensures that your idea and the compiler's idea of what 
  228.      value goes with which member are the same. When some of the 
  229.      optional braces are omitted, the compiler issues this warning.
  230.  
  231.   Page 197
  232.   --------
  233.    In the compile-time error "Last parameter of operator must have
  234.    type int," "operator-±" should actually read "operator--"
  235.  
  236.    The TLIB warning "library contains COMDEF records - extended
  237.    dictionary not created," should have the following note:
  238.      Any C++ module that contains virtual functions will have
  239.      COMDEF records; therefore, you can't create an extended
  240.      dictionary for C++ modules.
  241.  
  242.   Page 198
  243.   --------
  244.    The compile-time error "main must have return type of int"
  245.    actually applies to ANSI C (-A on the command line), not C++.
  246.  
  247.   Page 235
  248.   --------
  249.    There is a new linker error message:
  250.  
  251.     "Unable to process debug: disable TASM /zi option".
  252.  
  253.     The linker cannot process information generated in .ASM files
  254.     by the compiler (using the /S or /B option from the command
  255.     line or the IDE  Options|Compiler|Code Generation|
  256.     Generate Assembler Source or Compile Via Assembler.
  257.  
  258.  
  259.  
  260. Library Reference
  261. =================
  262.   Chapter 2, "The run-time library"
  263.   ---------------------------------
  264.     Page 173
  265.     --------
  266.       Under "Return value" "doserno" should be "_doserrno".
  267.  
  268.     Page 174
  269.     --------
  270.       Under "Return value" "doserno" should be "_doserrno" and
  271.       the entry for ENOENT should be "Path or file name not found".
  272.  
  273.     Page 185
  274.     --------
  275.       _fpreset is actually not available under Windows
  276.  
  277.     Page 551
  278.     --------
  279.       strxfrm's "Return value" should read: "The length of s1."
  280.  
  281.   Note that two functions are incorrectly prototyped in the Library
  282.   Reference. Here are their correct prototypes:
  283.  
  284.    size_t far _fstrlen(const char far *s);
  285.    size_t far _fstrcspn(const char far *s1, const char far *s2);
  286.  
  287.   The following functions have some missing documentation in the
  288.   Library Reference:
  289.  
  290.   ------------------------------------------------------------------
  291.   Function: stackavail
  292.   Gets the amount of available memory.
  293.  
  294.   Syntax:
  295.   #include <malloc.h>
  296.   size_t stackavail(void);
  297.  
  298.   ╔═══════╤════════╤══════════╤══════════╤═══════════╗
  299.   ║  DOS  │  UNIX  │  Windows │  ANSI C  │ C++ only  ║
  300.   ╟───────┼────────┼──────────┼──────────┼───────────╢
  301.   ║    ■  │        │          │          │           ║
  302.   ╚═══════╧════════╧══════════╧══════════╧═══════════╝
  303.  
  304.   Remarks:
  305.   stackavail returns the number of bytes available on the stack. This
  306.   is the amount of dynamic memory which alloca may access.
  307.  
  308.   Return value:
  309.   stackavail returns a size_t value indicating the number of bytes
  310.   available.
  311.  
  312.   See also:
  313.   alloca, allocmem, coreleft, _dos_allocmem, farcoreleft,
  314.   _stklen (global variable)
  315.  
  316.   Example:
  317.   #include <malloc.h>
  318.   #include <stdio.h>
  319.  
  320.   int main(void) {
  321.      char *buf;
  322.  
  323.      printf("\nThe stack: %u\tstack pointer: %u", stackavail(), _SP);
  324.      buf = (char *) alloca(100 * sizeof(char));
  325.      printf("\nNow, the stack: %u\tstack pointer: %u", stackavail(), _SP);
  326.      return(0);
  327.      }
  328.  
  329.  
  330.   Program output:
  331.     The stack: 63528         stack pointer: 65524
  332.     Now, the stack: 63424    stack pointer: 65420
  333.  
  334.  
  335.   ------------------------------------------------------------------
  336.   Function: strcmp, _fstrcmp
  337.   Compares one string to another.
  338.  
  339.   Syntax:
  340.   #include <string.h>
  341.   Near version: int strcmp(const char *s1, const char *s2);
  342.   Far version: int far _fstrcmp(const char far *s1, const char far *s2);
  343.  
  344.  
  345.                 ╔═══════╤════════╤══════════╤══════════╤═══════════╗
  346.                 ║  DOS  │  UNIX  │  Windows │  ANSI C  │ C++ only  ║
  347.                 ╟───────┼────────┼──────────┼──────────┼───────────╢
  348.   Near version  ║    ■  │    ■   │     ■    │    ■     │           ║
  349.                 ╟───────┼────────┼──────────┼──────────┼───────────╢
  350.   Far version   ║    ■  │        │     ■    │          │           ║
  351.                 ╚═══════╧════════╧══════════╧══════════╧═══════════╝
  352.  
  353.   Remarks:
  354.   strcmp performs an unsigned comparison of s1 to s2, starting with
  355.   the  first character in each string and continuing with
  356.   subsequent characters  until the corresponding characters differ
  357.   or until the end of the strings is reached.
  358.  
  359.   Return value:
  360.   strcmp returns a value that is
  361.  
  362.     < 0 if s1 is less than s2
  363.     == 0 if s1 is the same as s2
  364.     > 0 if s1 is greater than s2
  365.  
  366.   See also:
  367.   strcmpi, strcoll, stricmp, strncmp, strncmpi, strnicmp
  368.  
  369.   Example:
  370.   #include <string.h>
  371.   #include <stdio.h>
  372.  
  373.   int main(void)
  374.   {
  375.      char *buf1 = "aaa", *buf2 = "bbb", *buf3 ="ccc";
  376.      int ptr;
  377.      ptr = strcmp(buf2, buf1);
  378.      if (ptr > 0)
  379.         printf("buffer 2 is greater than buffer 1\n");
  380.      else
  381.         printf("buffer 2 is less than buffer 1\n");
  382.      ptr = strcmp(buf2, buf3);
  383.      if (ptr > 0)
  384.         printf("buffer 2 is greater than buffer 3\n");
  385.      else
  386.         printf("buffer 2 is less than buffer 3\n");
  387.      return 0;
  388.   }
  389.  
  390.  
  391.  
  392.   ------------------------------------------------------------------
  393.   Function: strcpy, _fstrcpy
  394.   Copies one string into another.
  395.  
  396.   Syntax
  397.   #include <string.h>
  398.   Near version: char *strcpy(char *dest, const char *src);
  399.   Far version: char far * _fstrcpy(char far *dest, const char far *src);
  400.  
  401.  
  402.  
  403.                 ╔═══════╤════════╤══════════╤══════════╤═══════════╗
  404.                 ║  DOS  │  UNIX  │  Windows │  ANSI C  │ C++ only  ║
  405.                 ╟───────┼────────┼──────────┼──────────┼───────────╢
  406.   Near version  ║    ■  │    ■   │     ■    │    ■     │           ║
  407.                 ╟───────┼────────┼──────────┼──────────┼───────────╢
  408.   Far version   ║    ■  │        │     ■    │          │           ║
  409.                 ╚═══════╧════════╧══════════╧══════════╧═══════════╝
  410.  
  411.   Remarks:
  412.   Copies string src to dest, stopping after the terminating null
  413.   character has been moved.
  414.  
  415.   Return value:
  416.   strcpy returns dest.
  417.  
  418.   See also: stpcpy
  419.  
  420.   Example:
  421.   #include <stdio.h>
  422.   #include <string.h>
  423.  
  424.   int main(void)
  425.   {
  426.      char string[10];
  427.      char *str1 = "abcdefghi";
  428.      strcpy(string, str1);
  429.      printf("%s\n", string);
  430.      return 0;
  431.   }
  432.  
  433.   ------------------------------------------------------------------
  434.   Function: _dos_open
  435.   Opens the specified file and prepares it for reading or writing.
  436.  
  437.   Syntax:
  438.   #include <fcntl.h>
  439.   #include <share.h>
  440.   #include <DOS.H>
  441.   unsigned _dos_open(const char *filename, unsigned oflags, int *handlep);
  442.  
  443.   Arguments:
  444.   filename --  File that the function opens and prepares for reading and/or
  445.                writing
  446.   oflags   --  Open-mode symbolic constants (defined in FCNTL.H) and
  447.                file-sharing symbolic constants (defined in SHARE.H) that
  448.                specify the file's open mode (read, write, share, etc.)
  449.   handlep  --  Points to the location where the function stores
  450.                the file's handle.
  451.  
  452.                 ╔═══════╤════════╤══════════╤══════════╤═══════════╗
  453.                 ║  DOS  │  UNIX  │  Windows │  ANSI C  │ C++ only  ║
  454.                 ╟───────┼────────┼──────────┼──────────┼───────────╢
  455.                 ║  Yes  │        │    Yes   │          │           ║
  456.                 ╚═══════╧════════╧══════════╧══════════╧═══════════╝
  457.  
  458.  
  459.   Remarks:
  460.   Opens the file specified by filename, then prepares it for reading
  461.   or writing. The file is always opened in binary mode.
  462.  
  463.   On successfully opening the file, the function sets the file
  464.   pointer (which marks the current position in the file) to the
  465.   beginning of the file.
  466.  
  467.   The maximum number of simultaneously open files is defined by
  468.   HANDLE_MAX.
  469.  
  470.   Return Value:
  471.   On success, _dos_open returns 0, stores the file handle at the location
  472.     *handlep
  473.   On error, _dos_open returns the DOS error code and sets errno to one
  474.     of the following:
  475.            ENOENT  (Path or file not found)
  476.            EMFILE  (Too many open files)
  477.            EACCES  (Permission denied)
  478.            EINVACC (Invalid access code)
  479.  
  480.    See Also:  _dos_creat _dos_read _dos_write _read open sopen
  481.  
  482.  
  483.  
  484. Turbo Assembler User's Guide
  485. ============================
  486.  Appendix D, "Utilities"
  487.  -----------------------
  488.   Page 333
  489.   --------
  490.    The last paragraph states that Turbo Assembler's online Help
  491.    facility is called TASMHELP. TASMHELP can be used as documented,
  492.    but only if Turbo Assembler is installed in a directory other
  493.    than the directory where Borland C++ is installed. If TASM is
  494.    installed in the same directory as Borland C++, use the THELP
  495.    utility for online help. THELP allows you to access a variety
  496.    of help files via an easy to use menu system.
  497.  
  498.  Here's how THELP works:
  499.  
  500.   1) After installing Borland C++ and Turbo Assembler, invoke THELP at
  501.      your DOS prompt.
  502.  
  503.   2) Type ALT-F to bring up the menu of available help files.
  504.  
  505.   3) Choose TASM.TAH to access help for Turbo Assembler.
  506.  
  507.  
  508.  
  509. ObjectWindows User's Guide
  510. ==========================
  511.   Chapter 2, "Stepping through Windows"
  512.   -------------------------------------
  513.     Page 22
  514.     -------
  515.       The sentence that begins "These libraries are located in
  516.       the library  directories listed in the following table..."
  517.       should instead read "Table 2.2 lists the file names of the
  518.       static ObjectWindows library  and static container class
  519.       library for each supported memory model."
  520.  
  521.   Chapter 11, "Dialog objects"
  522.   ----------------------------
  523.     Page 151
  524.     --------
  525.       In the TSampleWindow::GetName fragment shown, a line is in error.
  526.       The line that begins
  527.          if (ExecDialog(new TInputDialog(this...
  528.       should read
  529.          if (GetApplication()->ExecDialog(new TInputDialog(this...
  530.  
  531.   Chapter 12, "Control objects"
  532.   ----------------------------
  533.     Page 158+
  534.     ---------
  535.       Although it doesn't specifically state so, TListBox and its member
  536.       functions can be used with both single- and multiple- selection
  537.       list boxes.
  538.  
  539.   Chapter 16, "Class reference"
  540.   -----------------------------
  541.     Page 248
  542.     --------
  543.       TDialog::Cancel calls ShutDownWindow, not CloseWindow.
  544.  
  545.     Page 324
  546.     --------
  547.       Because TWindowsObject::WMClose deletes the interface object,
  548.       in most cases you'll want to use TWindowsObject::CloseWindow.
  549.  
  550.  
  551.  
  552. Turbo Vision User's Guide
  553. =========================
  554.  Chapter 13, "Class reference"
  555.  -----------------------------
  556.   Pages 271-2
  557.   -----------
  558.    The declarations for TDesktop's cascade and tile member
  559.    functions now take a const argument, as follows:
  560.  
  561.     void cascase(const TRect& R);
  562.     void tile(const TRect& R);
  563.  
  564.   Page 351
  565.   --------
  566.    TMemo's constructor is incorrect; use this one instead:
  567.  
  568.    TMemo(const TRect& bounds, TScrollBar *aHScrollBar,
  569.          TScrollBar *aVScrollBar, TIndicator *aIndicator,
  570.          ushort aBufSize );