home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / euphoria / what2do.doc < prev    next >
Text File  |  1994-02-17  |  5KB  |  103 lines

  1.  
  2.  Now that you have read README.DOC and INSTALL.DOC, and you have installed 
  3.  Euphoria, here are some things you can try:
  4.  
  5.  * Run each of the demo programs in the demo directory. You just type ex
  6.    followed by the name of the .ex file to execute. e.g.
  7.  
  8.        ex buzz
  9.  
  10.    will run the file buzz.ex. (Depending on your graphics card you may have to 
  11.    edit a line in some of the .ex files to select a different graphics mode. 
  12.    Most demos will try to use SVGA modes).
  13.  
  14.    You can also double-click on the .ex files from Windows. You will have
  15.    to associate .ex files with ex.exe. A few of the demos are really intended
  16.    to be run from the command line, but most will look ok from Windows.
  17.  
  18.  * Play the language wars game (demo\langwar\lw.ex). Start at the
  19.    novice level. It will take you a while to get used to the commands and
  20.    the directions. Can you defeat C++?
  21.  
  22.  * Generate some beautiful Mandelbrot pictures (demo\mset.ex). Zoom in on the 
  23.    interesting parts. Each picture is saved in a file so you don't have to
  24.    start from scratch each time.
  25.  
  26.  * Try to win at 3D TicTacToe. It can be done.
  27.  
  28.  * Use the Euphoria editor, ed, to edit a .e or .ex file. Notice the
  29.    use of colors. What happens if you delete a character from a keyword?
  30.    What happens when you add an extra level of brackets to an expression?
  31.    Use Esc q Enter to quit the editor - Esc h Enter for help.
  32.  
  33.  * Try the benchmarks in demo\bench. Do you get the same ratios as we did
  34.    in comparison with QBasic? If you have a C/C++ compiler, how much faster
  35.    can you get these benchmarks to run? We bet you'll be surprised, 
  36.    especially when you consider that Euphoria runs the benchmarks with
  37.    subscript checking and a host of other run-time checks.
  38.  
  39.  * Read the manual in doc\refman.doc. The simple expressive power of Euphoria
  40.    makes this manual much shorter than a C/C++ manual. C/C++ packages
  41.    require thousands of pages of documentation. WATCOM C/C++ has 57 different 
  42.    routines for memory allocation, and 67 different routines for manipulating 
  43.    strings and blocks of memory. How many of these routines does Euphoria need?
  44.    Answer: zero. In Euphoria, memory allocation happens automatically and 
  45.    strings are manipulated just like any other sequences. 
  46.  
  47.  * Try running a Euphoria program with tracing turned on. Add:
  48.         with trace
  49.         trace(1)
  50.    at the beginning of any .ex file.
  51.  
  52.  * Try running a Euphoria program with profiling turned on. You need
  53.    to say "with profile" at the start and "profile" at the end, after
  54.    execution. The result will be in ex.pro. Language Wars is interesting.
  55.  
  56.  * Try the learn.ex program in demo\learn. You may have trouble with this 
  57.    until you know more about Euphoria.
  58.  
  59.  * Take a look at the programs in bin: walkdir, grep, lines, eprint, freq etc.
  60.    These should be run from a command line.
  61.  
  62.  * Try modifying some of the demo programs. 
  63.  
  64.    First some simple modifications (takes less than a minute):
  65.  
  66.      What if there were 100 C++ ships in Language Wars? What if sb.ex had to 
  67.      move 1000 tiny balls instead of 50 big ones? Change some parameters in 
  68.      polygon.ex. Can you get prettier pictures to appear? Add some funny 
  69.      phrases to buzz.ex. 
  70.  
  71.    Then, some slightly harder ones (takes a few minutes):
  72.  
  73.      Define a new function of x and y in plot3d.ex. Modify walkdir.ex to print
  74.      a list of all files on your hard disk that meet some criteria, e.g. size 
  75.      is 0; year is greater than 1993.
  76.  
  77.    Then some challenging ones (takes an hour or more):
  78.  
  79.      Add your own customized new command to the editor. Set up your own 
  80.      customized database by defining the fields in mydata.ex. 
  81.  
  82.    Then some really challenging research problems! 
  83.  
  84.      Add SVGA graphics to Language Wars. Try to write a smarter 3D TicTacToe 
  85.      algorithm. Develop a faster sorting algorithm than any in allsorts.ex.
  86.      Implement a faster Mandelbrot algorithm.
  87.  
  88.  * Try writing your own program in Euphoria. A program can be as simple as:
  89.  
  90.        ? 2+2
  91.  
  92.    Remember that after any error you can simply type "ed" to jump into
  93.    the editor at the offending file and line.
  94.  
  95.    You can immediately run a program that you are editing by typing 
  96.    Esc e Enter in the editor. When the program is finished, hit Enter to 
  97.    return to the editor.
  98.  
  99.    Once you get used to it, you'll be developing programs much faster in
  100.    Euphoria than you could in BASIC, Fortran, Pascal, C/C++ or any other
  101.    language that we are aware of.
  102.  
  103.