Gri: `query' command

Chapters: 1: Introduction 2: Simple example 3: Invocation 4: Finer Control 5: X-Y Plots 6: Contour Plots 7: Image Plots 8: Examples 9: Gri Commands 10: Programming 11: Environment 12: Emacs Mode 13: History 14: Installation 15: Gri Bugs 16: Test Suite 17: Gri in Press 18: Acknowledgments 19: License Indices: Concepts Commands Variables | ### 9.3.31: ``query`'
    `query \synonym|.variable. \
      ["\prompt" ["\default"|.default.]]'
Ask the user for the value of a variable (number) or synonym (text string). Gri recognizes the type of the item being asked for, either a variable or synonym, by the presence of a dot or backslash in the second word of the command line. If a prompt string is given (in quotes), then this string is shown to the user. If a default is given (in parentheses), then it will be displayed also, and if the user types carriage-return, then that item will be assigned to the variable or synonym. If the default has more than one item, then Gri considers this a restrictive list of possibilities, and will demand that the answer be in that list, going into an infinite query loop until an item from the list (or carriage-return, meaning take first item) is found. The items in the list are to be separated by spaces, not commas or any other non-whitespace characters. NOTE: The ``-y`' command-line option bypasses all query commands, fooling Gri into thinking that the user typed a carriage-return to all questions. Thus the defaults, if they exist, are selected.