# $Id: user_questions.kqb e37ceeb677f2 2010-03-03 mtnyogi $
# 
# Copyright © 2008 Bruce Frederiksen
# 
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# 
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.


ate($meal, $ans)
    Did you eat $meal?
    ---
    $ans = yn

hours_since_last_meal($ans)
    How many hours has it been since you last ate?
    ---
    $ans = integer(0-48)

miles_to($dest, $ans)
    How many miles did you travel to get to $dest?
    ---
    $ans = number(0.1-3000)

price($object, $price)
    What did you pay for $object?
    ---
    $price = float

users_name($name)
    What's your name?
        - Please don't enter a fictitious (screen) name.
    ---
    $name = string(2-40)

state_code($state)
    Enter your two digit state code.
    ---
    $state = string('uppercase'[uppercase]/[A-Z][A-Z]/)

age($years)
    How old are you?
    ---
    $years = integer(1-130)

age_category($period_of_life)
    How old are you?
    ---
    $period_of_life = integer(child=1-12 |
                              teenager=13-19 |
                              young_adult=20-35 |
                              middle_age=35-64 |
                              elder=65-130)

stupid_question($ans)
    Can you answer a question
    that is several lines long?
    ---
    $ans = yn
        True  ! Correct!  This is true because the
                          sky is blue!
        False ! Nope!  Remember that the sky is blue!

wood($ans)
    How much wood would a woodchuck chuck if a woodchuck could chuck wood?
    ---
    $ans = integer(0-100) 
        -10   ! more than that!
        10-20 ! bingo!
        21-   ! I guess they're not as strong as you think ...

another_question($arg1, $arg2, $ans)
    question text with $arg1 stuff in it.
    on multiple lines
        - possibly indented
        - for who knows what reason...
            - maybe for $arg2?
    ---
    $ans = select_1
        1: prompt for this selection with $arg2 in it too
           which can span multiple lines
               - and be indented ...
           ! Nope!  Remember that the sky is blue!
        2: next prompt
           ! =1     # same review as 1:
        3: pick me! pick me!!!
           ! Correct!  You certainly know about $arg1!
             yep, multiple review lines too...
                - and indented...

problems($list)
    Which of these problems are you experiencing?
        - select all that apply
    ---
    $list = select_n
        boot: The system won't boot.
        os: I hate Windows!
        internet: I can't connect to the internet.
        slow: The system is running too slow.
        ouch: Help!  I've fallen and I can't get up!
        freeze: The system freezes or does not respond to input.
        printer: The printer doesn't work.
        senile: What's email?