home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / IOC / NARY / NARY.REA < prev    next >
Text File  |  1995-06-07  |  4KB  |  104 lines

  1. SAMPLE - Tree
  2.  
  3.    DESCRIPTION:
  4.         This program constructs a binary tree for the following
  5.         expression:  (8+2) * (2+4) / (7-5). The program prints this tree
  6.         in preorder, using prefix notation. It then calculates the result
  7.         of the expression. The program identifies subtrees consisting of
  8.         an operand and two operators, calculated the result and replaces
  9.         the subtree by its result. Finally, the tree consists of one node
  10.         which is the result of the expression.
  11.  
  12.    TASK:
  13.         This program uses a tree collection to calculate an arithmetic
  14.         expression
  15.  
  16.    CONCEPT/FEATURE:
  17.         This program is a sample to demonstrate the use of the default
  18.         class ITree.
  19.  
  20.    PROJECT LOCATION:
  21.         Inside the IOC Samples folder (inside the VisualAge C++ Samples
  22.         folder). 
  23.  
  24.    SOURCE FILE LOCATION:
  25.         X:\ibmcpp\samples\ioc\nary
  26.  
  27.         where X: is the drive you installed the samples and document
  28.         component of VisualAge C++.
  29.  
  30.    HOW TO RUN THE SAMPLE:
  31.  
  32.         FROM WITHIN THE WORKFRAME ENVIRONMENT:
  33.              To run the prebuilt project, open the Samples folder on your
  34.              OS/2 desktop then double-click on the project's icon to open
  35.              the project view of the sample.  Click on the RUN button of
  36.              the project's toolbar.
  37.  
  38.         FROM THE COMMAND LINE:
  39.              Simply type the name of the .EXE file, that is:
  40.  
  41.                  NARY
  42.  
  43.              If the sample fails to execute or abnormally ends, you can
  44.              get more information about the failure by turning on the
  45.              ICLUI trace.  This is done by setting the environment
  46.              variable ICLUI_TRACE as follows:
  47.  
  48.                    SET ICLUI_TRACE=ON
  49.                    SET ICLUI_TRACETO=STDERR
  50.  
  51.              The second export controls where the trace information is
  52.              reported.  With tracing turned on, ICLUI exception text will
  53.              be written to a standard error file. For example:
  54.  
  55.                    HELLO1 >HELLO1.OUT 2>&1
  56.  
  57.              The exception data is now in the file hello1.out.
  58.  
  59.    HOW TO BUILD THE SAMPLE PROJECT YOURSELF:
  60.  
  61.         FROM WITHIN THE WORKFRAME ENVIRONMENT:
  62.              Open the Samples folder on your OS/2 desktop then
  63.              double-click on the project's icon to open the project view
  64.              of the sample. In the upper half of the project window you
  65.              will see the icons of the files associated with the sample.
  66.              From the Project pulldown, select Build -> Rebuild All. To run
  67.              the sample project, see HOW TO RUN THE SAMPLE PROJECT above.
  68.  
  69.         FROM THE COMMAND LINE:
  70.              A command file is provided to allow rebuilding of the
  71.              WorkFrame projects from the command line.  Simply type:
  72.  
  73.                  BUILD
  74.  
  75.              To run the sample project, see HOW TO RUN THE SAMPLE PROJECT
  76.              above.
  77.  
  78.    SOFTWARE/HARDWARE PREREQUISITES:
  79.  
  80.         o   IBM VisualAge C++
  81.         o   OS/2 2.1 or Warp
  82.         o   IBM or compatible 386 and up.
  83.  
  84.    ADDITIONAL INFORMATION:
  85.  
  86.         o   For more information on the creation and use of projects in
  87.             the WorkFrame environment, see the VisualAge C++ for OS/2
  88.             User's Guide.
  89.         o   For more information on the Collection Classes, see the
  90.             VisualAge C++ for OS/2 Open Class Library User's Guide.
  91.  
  92.         Both books can be found online.  To access an online book, simply
  93.         open the main VisualAge C++ desktop folder, then open the
  94.         Information Folder inside.  To view a book, double-click on that
  95.         book's icon.
  96.  
  97.  
  98. REQUIRED FILES - TREE:
  99.  
  100.    o   nary.rea
  101.    o   build.cmd
  102.    o   nary.cpp
  103.    o   nary.xpc
  104.    o   nary.exe