Questions

version 5 by Michael Callaghan

  • Home page
  • Beginning
  • Previous
  • Next



  • Section: Rules for text questions
    We test the answer to text questions using the variable "current answer". The current answer is set to the player's answer. If the answer was given in the form "say answer", the word "say" and the following space is also removed.
    There are two default rules for text questions.
    The first rule, called the 'remove punctuation from text questions rule' determines whether or not punctuation is removed from the player's answer before it is processed. We can control punctuation removal by setting the truth state 'punctuation removal'.
        now punctuation removal is true;
        now punctuation removal is false;
    The last rule is called the 'default text rule'. If the question was a closed text question, the outcome is retry. If the question was an open text question, the outcome is parse.