CIS 554 -- REBOL Quiz Name __________________________________
  1. (1 point) Is this a valid first line for a REBOL program?
       Rebol [ ]
    Why or why not?

    Yes. REBOL is case insensitive; the brackets are required but may be empty.


  2. (2 points) Briefly tell what each of the following functions does, including how each parameter is used.

    1. either

      Usage: either condition true-block false-block
      If condition is TRUE, evaluates the first block, else evaluates the second.


    2. do

      Usage: do value
      Evaluates a block, file, URL, function, word, or any other value.


  3. (1 point) Put parentheses in the following to show how it is evaluated by REBOL:

    while and greater? x 0 lesser? x 100 x: to-integer read  %nums.txt

    while (and (greater? x 0) (lesser? x 100)) (x: to-integer (read  %nums.txt))

  4. (1 point) Create a button named save-button, with the text Save, that when clicked will call the save function (which has no arguments).

    save-button: button "Save" [save]