home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / libbasic / intro.txt < prev    next >
Text File  |  1994-04-23  |  8KB  |  224 lines

  1. Liberty BASIC introduction and installation notes.
  2. -------------------------------------------------------------------------
  3.  
  4. Thank you for trying Liberty BASIC!  Liberty BASIC is marketed as
  5. as shareware.  If you find this program useful, please register it.
  6. When you do you will receive the runtime engine, which will allow you
  7. distribute your programs without paying any royalties, and you will also
  8. receive the most recent version of this program.  See the file
  9. REGISTER.TXT.
  10.  
  11. This help system is based on the printed documentation.  You cannot actually
  12. type information into these help windows, but you can copy code out by
  13. highlighting it using the mouse, and then pulling down the Edit menu and
  14. selecting Copy.  This is useful when you want to try out a code example in
  15. these files without typing it all in.
  16.  
  17. Additionally, you can print any of these help files by pulling down the
  18. Functions menu and selecting print.  If you highlight the area you want to
  19. print using the mouse, then only that selected text will print.  Otherwise
  20. you will be asked if the entire text should be printed.
  21.  
  22. --------------------------------------------------------------------------
  23.  
  24.  
  25. System Requirements:
  26.  
  27.  
  28. Liberty BASIC is software for IBM AT compatible computers and
  29. requires the following hardware and software:
  30.  
  31.   One 286, 386, or 486 computer with at least 3 megabytes of RAM and
  32.   a hard drive with at least 2.5 megabytes of free space.  On machines
  33.   that only have 286 processors, 4 or more megabytes RAM is the
  34.   preferred configuration.  Microsoft Windows version 3.0 or version
  35.   3.1 (running in standard or enhanced mode), and a mouse.
  36.  
  37. - or -
  38.  
  39.   One 386 or 486 computer running OS/2 2.0 and at least 6 megabytes
  40.   of RAM, and with at least 2.5 megabytes (more strongly recommended)
  41.   of free hard disk space.  Win/OS2 must be installed, and you must have
  42.   a mouse.
  43.  
  44.  
  45. INSTALLATION:
  46.  
  47.   To install Liberty BASIC, first make sure that you are not
  48.   running Windows.  The program INSTALL.EXE is included with
  49.   Liberty BASIC to install it for you.  
  50.   
  51.   Run this program, and you will be asked where Windows resides.  
  52.   The default is C:\WINDOWS.  If Windows resides anywhere else, 
  53.   you must specify it here.
  54.  
  55.   Now you will be asked where to install Liberty BASIC.  The
  56.   default is C:\LIBERTY.  If you want it to be installed elsewhere,
  57.   then you must specify it here.
  58.  
  59.   You will then be given an opportunity to abort the installation.
  60.   If you choose not to abort, then installation will begin then.
  61.  
  62.   Once installation is complete, you may load Windows.  If you
  63.   specified any directory to install Liberty BASIC into other than
  64.   \LIBERTY, then you will need to alter the properties for the
  65.   Liberty BASIC icon to indicate where it is installed.  Otherwise
  66.   you can just go ahead and double-click on its icon to start
  67.   Liberty BASIC.
  68.  
  69.   Liberty BASIC starts with a file browser window.  It is arranged as
  70.   four panes, three across the top, and one on the bottom like so:
  71.  
  72.   +--------------------------------------------------------------+
  73.   | -                  Liberty BASIC  c:\liberty             v ^ |
  74.   +--------------------------------------------------------------+
  75.   | a             [1]  | [..]          [2]  | demo.bas      [3]  |
  76.   | b                  | liberty            | read.bas           |
  77.   | c                  | msdos              | test.bas           |
  78.   |                    |                    |                    |
  79.   | select drive here  | select directory   | select file here   |
  80.   |                    | here               |                    |
  81.   +--------------------------------------------------------------+
  82.   |                                                         [4]  |
  83.   |                                                              |
  84.   |                                                              |
  85.   |                                                              |
  86.   |         see BASIC source code here                           |
  87.   |                                                              |
  88.   |                                                              |
  89.   |                                                              |
  90.   |                                                              |
  91.   +--------------------------------------------------------------+
  92.  
  93.  Select the drive to browse in pane [1], then select the directory
  94.  (usually liberty) to browse in pane [2], then finally the file to 
  95.  browse in pane [3].  When the .BAS file is selected, its source will 
  96.  be displayed in pane [4].  To run the program, position the cursor
  97.  inside of pane [3] and press the right hand mouse button and a menu
  98.  will appear.  Then select the item BASIC source editor, and a new
  99.  window will open which will contain a copy of the source for the
  100.  selected file.  Then position the cursor inside of that pane and again 
  101.  press the right hand mouse button for another menu.  There are two 
  102.  options available, Run and Debug.  Run compiles and runs the program, 
  103.  and Debug provides the additional benefit of a 3 level source level
  104.  debugger with optional watch window.
  105.  
  106.  If you want help, you can get this on-line by pulling down the Help
  107.  menu.   If you select a word in the source editor and then select help,
  108.  the system will try to find that word or command in the text.  When
  109.  the help window opens, pressing CTRL-F will also bring up a find
  110.  dialog box.
  111.  
  112. Your First Liberty BASIC Program:
  113.  
  114. Let's illustrate how to develop programs with Liberty BASIC.  This next
  115. program is often the first example given when teaching any programming
  116. language.
  117.  
  118. First use your mouse to select the hard drive onto which you installed
  119. Liberty BASIC (probably drive C:).  Next select the appropriate directory
  120. (probably \liberty) and a list of BASIC program files will appear as below.
  121.  
  122.  
  123.  
  124. {Illustration was here}
  125.  
  126.  
  127.  
  128. Now pull down the Files menu and select Create.  You will be asked for a
  129. filename for your new program.  Type hello, and then press the Enter key
  130. or click on OK.
  131.  
  132.  
  133.  
  134. {Illustration was here}
  135.  
  136.  
  137.  
  138. You will now be asked to confirm creation of your new program file.  Click
  139. on Yes or press the Enter key.  If you type it wrong, then click on No.
  140.  
  141.  
  142.  
  143. {Illustration was here}
  144.  
  145.  
  146.  
  147. Now press the Enter key a couple of times and press the Tab key.  Then type:
  148.  
  149.   print "hello world!"
  150.  
  151. Now use the mouse to point at the text you just typed and press the button
  152. on the right side of the mouse, and a menu will appear.  Your should see:
  153.  
  154.  
  155.  
  156. {Illustration was here}
  157.  
  158.  
  159.  
  160. Now you can point at the Run item and press the left-hand mouse button to
  161. run your program, or your can just press the 'R' key to accomplish the same
  162. thing.
  163.  
  164. You will see a window open and then at once another smaller window will open
  165. with a notice saying: Execution of hello.bas complete.  This second window
  166. blocks your view of the first, which contains the result of your program.
  167. Click on the OK button to remove the notice, and you'll be able to see it
  168. better.
  169.  
  170. Here is what your finished program should look like.
  171.  
  172.  
  173.  
  174. {Illustration was here}
  175.  
  176.  
  177.  
  178. Now close the window labeled:  Program named - 'hello.bas'.
  179.  
  180. Let's save hello.bas so that we can refer back to it later.  Pull down the
  181. File menu and select the Save option.  Your first program is now saved to
  182. disk.
  183.  
  184.  
  185.  
  186. {Illustration was here}
  187.  
  188.  
  189.  
  190. Running other Programs:
  191.  
  192. Let's try running one of the sample programs that comes with Liberty BASIC.
  193. Select the file named buttons1.bas and run it as shown below:
  194.  
  195.  
  196.  
  197. {Illustration was here}
  198.  
  199.  
  200.  
  201. A window will appear with some buttons:
  202.  
  203.   Three color buttons:  Red, Blue, and Green
  204.   Two shape buttons: Triangle and Square
  205.   One other button: Size
  206.  
  207. This program will display two different kinds of spirals, a triangular kind,
  208. and a square kind.  Three different color options are available: red, blue,
  209. and green.  Additionally, the program will let you decide how large to draw
  210. the spiral.
  211.  
  212. Play around a bit with it.  Experiment.
  213.  
  214.  
  215. {Illustration was here}
  216.  
  217.  
  218.  
  219. When you're all done, close the window.  Buttons1.bas will stop and ask for
  220. confirmation before it closes the window.
  221.  
  222.  
  223.  
  224.