home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / comm / tis107.lha / SQ.doc < prev    next >
Text File  |  1993-02-12  |  3KB  |  62 lines

  1.                     "SQ", Question Sort/Validation Utility
  2.                                  for use with
  3.  
  4.                              The Immortal Struggle
  5.           Created, programmed and copyright (C)1993 by Chris Rea [UL]
  6.      A multiplayer online game for BBX, DLG-Pro, FalconCBCS, and Xenolink
  7.                             Release Date: 12-Feb-93
  8.  
  9.  
  10.                                  How To Use SQ
  11. -------------------------------------------------------------------------------
  12.      SQ  (which  stands  for  Sort  Questions)  is  a  small utility for use in
  13. conjunction  with  The  Immortal Struggle online game.  SQ will sort, validate,
  14. and  truncate all records found in the specified file and output the results to
  15. two other files.
  16.  
  17.      SQ  takes  a  single  command  line  argument:   the filename to validate,
  18. truncate,  and  sort.  SQ will output the sorted, valid records to a file named
  19. like  the  initial  filename  but  with ".sorted" appended.  SQ will output the
  20. invalid,  failed  questions  to a file named like the initial filename but with
  21. ".failed" appended.
  22.  
  23.      SQ  will  start by copying everything up to the first record separator bar
  24. ("---") to the new sorted file.  For example, with the default T.I.S.  question
  25. data  file,  information  on  format  is  stored here.  Next, SQ will read into
  26. memory each record, and only keep those which pass the validation check.
  27.  
  28.      The  validation  check  is  simple.  Records with questions larger than 76
  29. characters  are tossed into the failure file.  Records with answers larger than
  30. 39  characters are tossed into the failure file.  Records whose question and/or
  31. answer  do  not  conform  to  the  acceptable character range for questions and
  32. answers  will  also  be  tossed into the failure file.  Also, answers beginning
  33. with  "A  " or "THE " are also tossed into the failure file, since such answers
  34. are ambiguous and not in proper format.
  35.  
  36.      Any  lines  coming after the Answer line but before the question separator
  37. bar  ("---")  will  not  be stored in memory.  This is the "truncate" operation
  38. described  above.  When a player uses the SUGGEST incantation from with T.I.S.,
  39. their  entity  name  is  automatically added after the answer so that ambiguous
  40. questions  may  be  properly  verified.   Using  SQ, these extraneous lines are
  41. removed if present.
  42.  
  43.      After  the  scan  of  the  question  file  is  complete,  SQ  sorts (using
  44. quicksort) the records that were valid and stored in memory.  SQ sorts with the
  45. answer as the primary sort key and the question as the secondary sort key.  The
  46. records are then written out to the sorted file, and SQ is finished.
  47.  
  48.      You will want to examine the failure file to see what exactly the problems
  49. were  with  certain questions.  You may want to fix and append them back to the
  50. question  file  for  another  run  through SQ.  In any case, rename your sorted
  51. master  question file back to "TIS_Questions.dat" so that The Immortal Struggle
  52. may  have  access to these valid questions.  Do NOT run T.I.S.  with an invalid
  53. question  file.  It isn't harmful or crash-prone in such a situation--it's just
  54. that  people  won't be able to answer the questions if they appear munged or if
  55. the answer contains characters that they can't type, etc.
  56.  
  57.      Have fun!
  58.  
  59. -------------------------------------------------------------------------------
  60.                                   END OF FILE
  61. -------------------------------------------------------------------------------
  62.