home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / qtawkos2.zip / DIFFDOC.FMT next >
Text File  |  1994-11-21  |  35KB  |  755 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.         QTAwk                         - 1 -                         QTAwk
  8.  
  9.  
  10.         
  11.         
  12.         
  13.         See the following for a complete definition of Awk
  14.         
  15.          A.  V.  Aho, B.  W.  Kernighan, P.  J.  Weinberger,
  16.              "The AWK Programming Language"
  17.              Addison-Wesley 1988, ISBN 0-201-07981-X
  18.         
  19.         
  20.         
  21.                     Major differences between QTAwk and Awk.             
  22.         
  23.         1.  Expanded Regular Expressions
  24.             All of the Awk regular expression operators are allowed  plus
  25.             the following:
  26.             a)  complemented  character  class  using  the  Awk notation,
  27.                 '[^...]', as well as the Awk/QTAwk and C logical negation
  28.                 operator, '[!...]'. 
  29.                 
  30.             b)  Matched  character  classes, '[#...]'.  These classes are
  31.                 used in pairs.  The position of the character matched  in
  32.                 the  first  class  of  the pair, determines the character
  33.                 which must match in the position occupied by  the  second
  34.                 class of the pair. 
  35.                 
  36.             c)  Look-ahead   Operator.    r@t  regular  expression  r  is
  37.                 matched only when  followed  by  regular  expression  t. 
  38.                 
  39.             d)  Repetition  Operator.   r{n1,n2} at least n1 and up to n2
  40.                 repetitions of regular expression r. 
  41.                 
  42.             e)  Named  Expressions.   {named_expr}  is  replaced  by  the
  43.                 string value of the corresponding variable. 
  44.                 
  45.             f)  Tagged  Expressions.  Enclosing an expression, or portion
  46.                 of  an  expression,  in  parenthesis,  "()"  makes   that
  47.                 expression  available  for  use  with  the  Tag Operator,
  48.                 '$$'. 
  49.             
  50.         2.  Consistent statement termination syntax.  The  QTAwk  Utility
  51.             Creation  Tool utilizes the semi-colon, ';', to terminate all
  52.             statements.   The  practice  in  Awk  of  using  newlines  to
  53.             "sometimes"  terminate  statements  is  no  longer  allowed. 
  54.             
  55.         3.  Expanded Operator Set
  56.  
  57.  
  58.         QTAwk                         - 1 -                         QTAwk
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.         QTAwk                         - 2 -                         QTAwk
  66.  
  67.  
  68.             The Awk set of operators has been  changed  to  more  closely
  69.             match  those  of  C.   The  Awk match operator, '~', has been
  70.             changed to '~~' so that  the  similarity  between  the  match
  71.             operators, '~~' and '!~', to the equality operators, '==' and
  72.             '!=", is complete.  The single tilde symbol, '~', reverts  to
  73.             the  C one's complement operator, an addition to the operator
  74.             set over  Awk.   The  introduction  of  the  explicit  string
  75.             concatenation  operator.   The  remaining  "new" operators to
  76.             QTAwk are:
  77.             
  78.             
  79.             
  80.             
  81.             Operation             Operator                               
  82.             tag                   $$                                     
  83.             one's complement      ~                                      
  84.             concatenation         ∩                                      
  85.             shift left/right      << >>                                  
  86.             matching              ~~ !~                                  
  87.             bit-wise AND          &                                      
  88.             bit-wise XOR          @                                      
  89.             bit-wise OR           |                                      
  90.             sequence              ,                                      
  91.             
  92.              The carot, '^', remains as the exponentiation operator.  The
  93.             symbol '@' is used for the exclusive OR operator.  For string
  94.             operands, the shift  operators,  '<<'  and  '>>',  shift  the
  95.             strings  with  wrap-around  instead  of  a  bit  shift as for
  96.             numeric operands. 
  97.             
  98.         4.  Expanded set of recognized constants in QTAwk  utilities  and
  99.             input:
  100.             a)  decimal integers,
  101.             b)  octal integers,
  102.             c)  hexadecimal integers,
  103.             d)  character constants, and
  104.             e)  floating point constants. 
  105.             
  106.         5.  Expanded Predefined patterns giving more control:
  107.             a)  INIITAL  -  similar  to  BEGIN.   Actions  executed after
  108.                 opening each input file and before reading first record. 
  109.                 
  110.             b)  FINAL  -  similar to END.  Actions executed after reading
  111.                 last record of each input file and before closing  file. 
  112.                 
  113.             c)  NOMATCH  -  actions  executed  for  each input record for
  114.  
  115.  
  116.         QTAwk                         - 2 -                         QTAwk
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.         QTAwk                         - 3 -                         QTAwk
  124.  
  125.  
  126.                 which no pattern was matched. 
  127.                 
  128.             d)  GROUP - used to group multiple  regular  expressions  for
  129.                 search  optimization.   Can  speed  search by a factor of
  130.                 six. 
  131.             
  132.         6.  True Multidimensional Arrays
  133.             The use  of  the  comma  in  index  expressions  to  simulate
  134.             multiple array indices is no longer supported.  True multiple
  135.             indices  are  supported.   Indexing  is  in  the  C   manner,
  136.             'a[i1][i2]'.   The  SUBSEP  built-in variable of Awk has been
  137.             dropped since it is no longer necessary.  The Awk practice of
  138.             only  creating  array  elements which have been referenced is
  139.             continued. 
  140.             
  141.         7.  Integer array indices as well as string indices
  142.             Array indices have been expanded to include integers as  well
  143.             as  the string indices of Awk.  Indices are not automatically
  144.             converted to strings as  in  Awk.   Thus,  for  true  integer
  145.             indices, the index ordering follows the numeric sequence with
  146.             an integer index value of  '10'  following  a  value  of  '2'
  147.             instead of preceding it.  Both integer and string indices may
  148.             be mixed in referencing the elements of an array.  Thus,  the
  149.             following is supported:
  150.             a)  A[1]
  151.             b)  A["WA"]
  152.             c)  A[1]["MD"]
  153.             d)  A["WA"][10]
  154.             
  155.         8.  Arrays integrated into QTAwk
  156.             QTAwk integrates arrays with arithmetic operators so that the
  157.             operations are carried out on the entire array.   QTAwk  also
  158.             integrates  arrays  into  user-defined functions so that they
  159.             can be passed to  and  returned  from  such  functions  in  a
  160.             natural  and  intuitive manner.  Awk does not allow returning
  161.             arrays  from  user-defined  functions  or  allow   arithmetic
  162.             operators to operate on whole arrays. 
  163.             
  164.         9.  Use  of arrays for true dynamic Regular Expressions.  The use
  165.             of an arrays in a match operation will  match  against  every
  166.             element  as a separate regular expression.  The internal form
  167.             of the combined regular  expressions  will  be  derived  when
  168.             first used.  The internal form can be assigned with the array
  169.             and is not discarded until the array is  changed.   The  user
  170.             thus controls explicity through the assignment statement, the
  171.             retention of the internal regular expression form. 
  172.  
  173.  
  174.         QTAwk                         - 3 -                         QTAwk
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.         QTAwk                         - 4 -                         QTAwk
  182.  
  183.  
  184.         10.  NEW keywords:
  185.             
  186.             a)  cycle
  187.                 similar to 'next' except that may use current  record  in
  188.                 restarting   outer   pattern   matching  loop.   Built-in
  189.                 variable 'MAX_CYCLE' limits number of possible  loops  to
  190.                 prevent   infinite   loops.    Also   built-in   variable
  191.                 'CYCLE_COUNT' contains current count of cycles. 
  192.                 
  193.             b)  deletea
  194.                 similar  to  'delete'  except  that  ALL   array   values
  195.                 deleted. 
  196.                 
  197.             c)  switch, case, default
  198.                 similar  to C syntax with the allowed 'switch' and 'case'
  199.                 values expanded to include any  legal  QTAwk  expression,
  200.                 evaluated  at  run-time.  The expressions may evaluate to
  201.                 any value including any numeric value, string or  regular
  202.                 expression.   Numeric  and  string values are compared as
  203.                 numerics or  strings  respectively.   Regular  expression
  204.                 values  are  compared  as  in  the match operator, '~~'. 
  205.                 
  206.             d)  local
  207.                 new keyword to allow the declaration  and  use  of  local
  208.                 variables    within    compound   statements,   including
  209.                 user-defined  functions.   Its  use   in   user   defined
  210.                 functions  instead of the Awk practice of defining excess
  211.                 formal parameters, leads to easier to read  and  maintain
  212.                 functions.   The  C 'practice' of allowing initialization
  213.                 in the 'local' statement is followed. 
  214.                 
  215.             e)  endfile
  216.                 similar to 'exit'.  Simulates end of current  input  file
  217.                 only,  any  remaining  input  files are still processed. 
  218.                 
  219.             f)  include
  220.                 A  new  directive  "#include"  has  been   added.    This
  221.                 directive  allows  the user to include utility files from
  222.                 within another utility file.  This is handy for including
  223.                 files  of  often used user-defined functions or constants
  224.                 without having to name the file  on  the  command  line. 
  225.             
  226.         11.  Expanded Arithmetic Functions
  227.             QTAwk  includes  built-in  arithmetic  functions.  All of the
  228.             functions supported by Awk plus the following:
  229.             a)  acos(x)
  230.  
  231.  
  232.         QTAwk                         - 4 -                         QTAwk
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.         QTAwk                         - 5 -                         QTAwk
  240.  
  241.  
  242.             b)  asin(x)
  243.             c)  cosh(x)
  244.             d)  jdn() or jdn(y,m,d) or jdn(fdate)
  245.             e)  fract(x)
  246.             f)  log10(x)
  247.             g)  pi() or pi
  248.             h)  sinh(x)
  249.             
  250.         12.  Expanded string functions
  251.             QTAwk  includes  built-in  string  functions.   All  of   the
  252.             functions supported by Awk plus the following:
  253.             a)  cal(fmt_str,jdn)
  254.             b)  center(s,w) or center(s,w,c)
  255.             c)  copies(s,n)
  256.             d)  deletec(s,p,n)
  257.             e)  insert(s1,s2,p)
  258.             f)  justify(a,n,w) or justify(a,n,w,c)
  259.             g)  overlay(s1,s2,p)
  260.             h)  remove(s,c)
  261.             i)  replace(s)
  262.             j)  sdate(fmt_str)       or      sdate(fmt_str,fdate)      or
  263.                 sdate(fmt_str,y,m,d)
  264.             k)  srange(c1,c2)
  265.             l)  srev(s)
  266.             m)  stime(fmt_str)      or      stime(fmt_str,ftime)       or
  267.                 stime(fmt_str,h,m,s)
  268.             n)  stran(s) or stran(s,st) or stran(s,st,sf)
  269.             o)  strim(s) or strim(s,c) or strim(s,c,d)
  270.             p)  strlwr(s)
  271.             q)  strupr(s)
  272.             
  273.         13.  New Miscellaneous functions
  274.             a)  The  function  'rotate(a)'  is  provided  to  rotate  the
  275.                 elements of the array a. 
  276.             b)  execute(s) or execute(s,se) or execute(s,se,rf) - execute
  277.                 string s
  278.             c)  execute(a) or execute(a,se) or execute(a,se,rf) - execute
  279.                 array a
  280.             d)  e_type(e) - return type of expression 'e'
  281.             e)  findfile(var,pattern,attributes)
  282.             f)  pd_sym - access pre-defined symbol table
  283.             g)  ud_sym - access user defined symbol table
  284.             h)  resetre  -  reset  all  regular  expressions  to  utility
  285.                 start-up condition
  286.             
  287.         14.  New I/O functions
  288.  
  289.  
  290.         QTAwk                         - 5 -                         QTAwk
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.         QTAwk                         - 6 -                         QTAwk
  298.  
  299.  
  300.             I/O  function  syntax has been made consistent with syntax of
  301.             other functions.  The redirection  operators,  '<',  '>'  and
  302.             '>>',  and  pipeline  operator,  '|',  have  been  deleted as
  303.             excessively  error  prone  in  expressions.   The  functional
  304.             syntax  of  the 'getline' function has been made identical to
  305.             that of the other  built-in  functions.   The  new  functions
  306.             'fgetline',  'fprint'  and 'fprintf' have been introduced for
  307.             reading and writing to files other  than  the  current  input
  308.             file. 
  309.             
  310.              Single  character  input/output  functions  have been added:
  311.             a)  getc() - return next character from current  input  file,
  312.             b)  fgetc() - return next character from named file
  313.             c)  putc(c)  -  output  character  c  to standard output file
  314.             d)  fputc(c,F) - output character c to file F
  315.             e)  srchrecord(sp[,rs[,var]]) - search current input file for
  316.                 pattern
  317.             f)  fsrchrecord(fn,sp[,rs[,var]])   -   search  file  fn  for
  318.                 pattern
  319.             
  320.              The dropped  file  re-direction  operator,  '>>',  has  been
  321.             replaced by the 'append' function:
  322.             
  323.              append(F)  --  Opens the file F for output to the end of the
  324.             file.  All subsequent output to the file is appended  to  the
  325.             end  of  the  file.   This function must be called before the
  326.             first output to the file to append.  Any output to  the  file
  327.             prior to calling this function will open the file and discard
  328.             any existing contents, i.e., truncate to zero length. 
  329.             
  330.         15.  New function to  obtain  record  number  of  specific  file:
  331.             get_FNR(file)
  332.             
  333.         16.  Expanded capability of formatted Output. 
  334.             The limited output formatting available with the Awk 'printf'
  335.             function has been expanded by adopting  the  complete  output
  336.             format specification of the ANSI C standard. 
  337.             
  338.         17.  Use of 'local' keyword
  339.             The   'local'  keyword  has  been  introduced  to  allow  for
  340.             variables local to user-defined functions (and  any  compound
  341.             statement).    This  expansion  makes  the  Awk  practice  of
  342.             defining 'extra'  formal  parameters  no  longer  necessary. 
  343.             
  344.         18.  Expanded user-defined functions
  345.             With  the  'local'  keyword,  QTAwk allows the user to define
  346.  
  347.  
  348.         QTAwk                         - 6 -                         QTAwk
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.         QTAwk                         - 7 -                         QTAwk
  356.  
  357.  
  358.             functions that may accept a variable  number  of  arguments. 
  359.             Functions,  such as finding the minimum/maximum of a variable
  360.             number of variables, are possible with  one  function  rather
  361.             than   defining   separate   functions   for   each  possible
  362.             combination of arguments. 
  363.             
  364.         19.  User controlled trace capability
  365.             A user controlled statement trace capability has been added. 
  366.             This  gives  the  user  a  simple  to  use mechanism to trace
  367.             utility execution.  Rather than  adding  'print'  statements,
  368.             merely re-defining the value of a built-in variable will give
  369.             utility execution trace information, including  utility  line
  370.             number. 
  371.             
  372.         20.  Expanded built-in variable list
  373.             With  built-in  variables, QTAwk includes all of the built-in
  374.             variables of Awk plus the following:  (Note:  the  definition
  375.             and  use of SUBSEP has been changed from that in Awk.  Others
  376.             which have been cjanged are also listed below.)
  377.             
  378.             a)  _arg_chk - used to determine whether to check  number  of
  379.                 arguments passed to user-defined functions to insure that
  380.                 number passed agree with the number defined. 
  381.                 
  382.             b)  ARGI  -  index  value  in  ARGV  of  next  command   line
  383.                 argument.   Gives  more  control of command line argument
  384.                 processing. 
  385.                 
  386.             c)  CONVFMT ==> STRING conversion format for  floating  point
  387.                 numbers.    Default  value  of  "%.6g".   Used  only  for
  388.                 converting floating point numbers to strings.  OFMT  used
  389.                 for output. 
  390.                 
  391.             d)  CLENGTH  -  similar  to 'RLENGTH' of Awk.  Set whenever a
  392.                 'case' value evaluates to a regular expression. 
  393.                 
  394.             e)  CSTART - similar to 'RSTART'  of  Awk.   Set  whenever  a
  395.                 'case' value evaluates to a regular expression. 
  396.                 
  397.             f)  CYCLE_COUNT  -  count  number  of  outer loop cycles with
  398.                 current input record. 
  399.                 
  400.             g)  DEGREES - if TRUE, trigonometric functions assume  degree
  401.                 values, radians if FALSE. 
  402.                 
  403.             h)  DELAY_INPUT_PARSE  ==>  TRUE/FALSE.   Default value = 0. 
  404.  
  405.  
  406.         QTAwk                         - 7 -                         QTAwk
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.         QTAwk                         - 8 -                         QTAwk
  414.  
  415.  
  416.                 Used to delay parsing of the current input  record  until
  417.                 the  value of NF or one of the field variables, $i, 1 ≤ i
  418.                 ≤ NF, is needed.  The default value  is  false.   If  the
  419.                 value  is true, then the input record is not parsed until
  420.                 necessary.  For utilities which do not  reference  NF  or
  421.                 the  field variables, $i, in any patterns expressions (or
  422.                 seldom  executed  pattern  expressions),   delaying   the
  423.                 parsing  of  the  input record can speed the execution of
  424.                 the  utility  significantly.   The  normal  sequence   of
  425.                 execution is:
  426.                 1:  determine  next  record  according  to  RS  and  read
  427.                     record,
  428.                 2:  set FNR and NR,
  429.                 3:  parse record according to FS and set NF and $i, 1 ≤ i
  430.                     ≤ NF,
  431.                 4:  start executing pattern expressions
  432.                 
  433.                  The  third  step  in  the  above sequence can be delayed
  434.                 until  a  field  variable  value  or  NF  is  needed   by
  435.                 DELAY_INPUT_PARSE to a true value. 
  436.                 
  437.             i)  ENVIRON  -  one  dimensional array with elements equal to
  438.                 the environment strings passed to QTAwk
  439.                 
  440.             j)  ECHO_INPUT - controls echo  of  standard  input  file  to
  441.                 standard output file. 
  442.                 
  443.             k)  FALSE - predefined with constant value, 0. 
  444.                 
  445.             l)  FIELDFILL  ==>  used to fill a field when the replacement
  446.                 value is less than  the  field  width  or  if  the  field
  447.                 changed  is  greater  than  the  number  of fields in the
  448.                 original record.  If the field changed  is  greater  than
  449.                 the  number  of  fields defined in FIELDWIDTHS, the extra
  450.                 fields created are initialized as null strings  separated
  451.                 by  the  strng value of OFS.  This variable value is used
  452.                 only when field splitting is based on FIELDWIDTHS  rather
  453.                 than FS.  The default value is a single blank character. 
  454.                 
  455.             m)  FIELDWIDTHS ==> when assigned a string  value  containing
  456.                 space separated integral numbers of the form:
  457.                 
  458.                  n1 n2 n3 ...  nn
  459.                 
  460.                  the  splitting  of input records into fields is governed
  461.                 by the numbers  in  FIELDWIDTHS  rather  than  FS.   Each
  462.  
  463.  
  464.         QTAwk                         - 8 -                         QTAwk
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.         QTAwk                         - 9 -                         QTAwk
  472.  
  473.  
  474.                 number  in  FIELDWIDTHS  specifies  the  width of a field
  475.                 including columns between fields.  If you want to  ignore
  476.                 the  columns between fields, you can specify the width as
  477.                 a separate field that is subsequently ignored.  When  the
  478.                 value   FIELDWIDTHS  does  not  match  this  form,  field
  479.                 splitting is done using FS in the usual manner.   If  the
  480.                 length of the input record is greater than the sum of the
  481.                 field widths specified in FIELDWIDTHS, QTAwk  creates  an
  482.                 additional  field  and assigns the remainder of the input
  483.                 record to the field. 
  484.                 
  485.             n)  FILE_SORT - controls sort order of file list returned  by
  486.                 findfile.   files may be sorted by name, extension, date,
  487.                 time and/or size. 
  488.                 
  489.             o)  FILEDATE -- date in DOS format of  current  input  file. 
  490.                 
  491.             p)  FILEDATE_CREATE  ==>  contains  the  creation date of the
  492.                 current input file in the operating system  format.   The
  493.                 'sdate'  functions  may  be  used  to  format  the date. 
  494.                 Changing the value of this variable has no effect on  the
  495.                 creation  date  of  the current input file.  On PC/MS-DOS
  496.                 systems, this value of this variable equals the value  of
  497.                 FILEDATE. 
  498.                 
  499.             q)  FILEDATE_LACCESS  ==>  contains the last file access date
  500.                 of  the  current  input  file  in  the  operating  system
  501.                 format.   The 'sdate' functions may be used to format the
  502.                 date.  Changing the value of this variable has no  effect
  503.                 on  the  last  access date of the current input file.  On
  504.                 PC/MS-DOS systems, this value of this variable equals the
  505.                 value of FILEDATE. 
  506.                 
  507.             r)  FILETIME  --  time  in DOS format of current input file. 
  508.             s)  FILETIME_CREATE ==> contains the  creation  time  of  the
  509.                 current  input  file  in  the  DOS  format.   The 'stime'
  510.                 functions may be used to format the time.   Changing  the
  511.                 value of this variable has no effect on the creation time
  512.                 of the current input  file.   On  PC/MS-DOS  systems  the
  513.                 value  of  this  variable  equals the value of FILETIME. 
  514.                 
  515.             t)  FILETIME_LACCESS ==> contains the last file  access  time
  516.                 of the current input file in the DOS format.  The 'stime'
  517.                 functions may be used to format the time.   Changing  the
  518.                 value  of this variable has no effect on the lastr access
  519.                 time of the current input file.  On PC/MS-DOS systems the
  520.  
  521.  
  522.         QTAwk                         - 9 -                         QTAwk
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.         QTAwk                        - 10 -                         QTAwk
  530.  
  531.  
  532.                 value  of  this  variable  equals the value of FILETIME. 
  533.                 
  534.             u)  FILESIZE -- size in bytes of current input file. 
  535.                 
  536.             v)  FILEATTR --  file  attributes  of  current  input  file. 
  537.                 
  538.             w)  FILEPATH  ==>  contains the drive and path of the current
  539.                 input file.  The path string ends with  the  subdirectory
  540.                 separator character.  Changing the value of this variable
  541.                 has no effect on the path of  the  current  input  file. 
  542.                 
  543.             x)  FILE_SEARCH  --  TRUE/FALSE value to search current input
  544.                 file  for   record(s)   containing   match   to   regular
  545.                 expression(s)  in FILE_SEARCH_PAT.  Default value FALSE. 
  546.                 
  547.             y)  FILE_SEARCH_PAT  --  contains   one   or   more   regular
  548.                 expressions for searching current input file. 
  549.                 
  550.             z)  Gregorian  - controls use of Gregorian or Julian calendar
  551.                 in cal and jdn. 
  552.                 
  553.             aa)  IGNORECASE ==> TRUE/FALSE.  Default == 0.   If  assigned
  554.                 a  true  value,  QTAwk  ignores  case  in  any  operation
  555.                 comparing  two   strings   and   for   single   character
  556.                 comparisons.  The affected comparisons include:
  557.                 
  558.                 1:  any  match  against  regular  expressions  using  the
  559.                     operators, '~~' and '!~', either explicit or implied,
  560.                     in pattern expressions,
  561.                 2:  any  match  against  regular  expressions  using  the
  562.                     operators, '~~' and '!~', either explicit or implied,
  563.                     in action expressions,
  564.                 3:  any  match  against  regular  expressions  using  the
  565.                     functions: gsub(), index(), match(), split(),  sub(),
  566.                     strim, srch_record and fsrch_record. 
  567.                 4:  any search using the FILE_SEARCH_PAT variable,
  568.                 5:  any  matches  of one string against another using the
  569.                     '==' and '!=' operators,
  570.                 6:  any match of one character against another using  the
  571.                     '==' and '!=' operators,
  572.                 7:  any  match  of  one  string against another string in
  573.                     'switch'/'case' statements,
  574.                 8:  any match of one character against another  character
  575.                     in 'switch'/'case' statements,
  576.                 9:  any   match   against   a   regular   expression   in
  577.                     'switch'/'case' statements,
  578.  
  579.  
  580.         QTAwk                        - 10 -                         QTAwk
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.         QTAwk                        - 11 -                         QTAwk
  588.  
  589.  
  590.                 10:  all searches for record terminator character/strings
  591.                     using RS,
  592.                 11:  all  searches for field terminator character/strings
  593.                     using FS. 
  594.                 
  595.             ab)  LONGEST_EXP - used to control  whether  the  longest  or
  596.                 the  first  string matching a regular expression is found
  597.                 in regular expression  matching  done  in  patterns,  the
  598.                 match operators, '~~' and '!~', the 'match' function, the
  599.                 'sub'  and  'gsub'  functions  and  in   'case'   regular
  600.                 expressions. 
  601.                 
  602.             ac)  MAX_CYCLE   -   maximum  number  of  outer  loop  cycles
  603.                 permitted with current input record. 
  604.                 
  605.             ad)  MLENGTH - similar to 'RLENGTH' of Awk.  Set  whenever  a
  606.                 stand-alone   regular   expression   is   encountered  in
  607.                 evaluating a pattern. 
  608.                 
  609.             ae)  MSTART - similar to 'RSTART' of  Awk.   Set  whenever  a
  610.                 stand-alone   regular   expression   is   encountered  in
  611.                 evaluating a pattern. 
  612.                 
  613.             af)  NG - equal to the number of the regular expression in  a
  614.                 group  matching  a  string  in the current input record. 
  615.                 
  616.             ag)  OFMT ==> output conversion  format  for  floating  point
  617.                 numbers.  Default value of "%.6g".  Used only for output,
  618.                 see CONVFMT for internal  conversion  of  floating  point
  619.                 numbers. 
  620.                 
  621.             ah)  QTAwk_Path   -   initialized  from  'QTAWK'  environment
  622.                 variable.  Sets paths searched for input files. 
  623.                 
  624.             ai)  RECLEN ==> If assigned a non-zero  numeric  value,  then
  625.                 the  current  input  file  is assumed to consist of fixed
  626.                 length records  with  the  record  length  equal  to  the
  627.                 integral  value  of RECLEN.  When RECLEN determines input
  628.                 records, RT is assigned the null string whenever a record
  629.                 is read from the current input file. 
  630.                 
  631.             aj)  RETAIN_FS  -  if TRUE the original characters separating
  632.                 the fields of  the  current  input  record  are  retained
  633.                 whenever  a field is changed, causing the input record to
  634.                 be re-constructed.  If FALSE the output field  separator,
  635.                 OFS,  is  used  to  separate  fields in the current input
  636.  
  637.  
  638.         QTAwk                        - 11 -                         QTAwk
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.         QTAwk                        - 12 -                         QTAwk
  646.  
  647.  
  648.                 record during reconstruction.  The latter practice is the
  649.                 only method available in Awk. 
  650.                 
  651.             ak)  RT  ==>  set  equal  to  the  record  terminator  string
  652.                 whenever a new record is  read  from  the  current  input
  653.                 file.   If  fixed  langth  records  are  used  by setting
  654.                 RECLEN, then RT is assigned the null string. 
  655.                 
  656.             al)  SPAN_RECORDS -- TRUE/FALSE,  default  value  FALSE.   if
  657.                 TRUE  allows  matches to FILE_SEARCH_PAT to span multiple
  658.                 input records and return  multiple  records  in  $0.   If
  659.                 FALSE,   matches  confined  to  a  single  record.   Also
  660.                 controls matches spanning  records  in  'srchrecord'  and
  661.                 'fsrchrecord' functions. 
  662.                 
  663.             am)  SUBSEP  --  string value used as the array element index
  664.                 separator in MATCH_INDEX. 
  665.                 
  666.             an)  TRACE  -  value  used  to  determine  utility  tracing. 
  667.                 
  668.             ao)  TRANS_FROM/TRANS_TO  -  strings used by 'stran' function
  669.                 if second and/or third arguments not specified. 
  670.                 
  671.             ap)  TRUE - predefined with constant value, 1
  672.                 
  673.             aq)  vargc - used  only  in  used-defined  functions  defined
  674.                 with  a  variable  number  of arguments.  At runtime, set
  675.                 equal to the actual number of variable arguments passed. 
  676.                 
  677.             ar)  vargv  -  used  only  in  used-defined functions defined
  678.                 with a variable number  of  arguments.   At  runtime,  an
  679.                 single  dimensioned  array  with  each element set to the
  680.                 argument actually passed. 
  681.             
  682.         21.  Definition of built-in variable, RS, expanded.   When  value
  683.             assigned  to  RS,  it is converted to string form.  If longer
  684.             than  a  single  character,  string  treated  as  a   regular
  685.             expression.   Strings  matching  regular  expression  act  as
  686.             record  separator.   If  single  character,  that   character
  687.             becomes  record  separator.   Similar  in  behavior  to field
  688.             separator, FS. 
  689.             
  690.         22.  In QTAwk, setting built-in variable, "FILENAME", to  another
  691.             value  will  change  the  current  input  file.   Setting the
  692.             variable in Awk, has no effect on current input file. 
  693.             
  694.  
  695.  
  696.         QTAwk                        - 12 -                         QTAwk
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.         QTAwk                        - 13 -                         QTAwk
  704.  
  705.  
  706.         23.  In QTAwk, setting built-in variable,  NF  to  another  value
  707.             will  change the current contents of $0.  If the new value is
  708.             greater than the current value, the  current  input  line  is
  709.             lengthened  with  new  empty  fields  separated by the output
  710.             field separator strings, OFS.  If the new value is less  than
  711.             the  current  value, the $0 is shortened by truncating at the
  712.             end of the field corresponding to the new NF value. 
  713.             
  714.         24.  Tag Operator, $$, may be used in  manner  similar  to  field
  715.             operator,  $.   The  tag operator may be used to obtain or to
  716.             set a particular part of  the  string  matching  the  regular
  717.             expression pattern. 
  718.             
  719.         25.  The  return value of the 'getline' function has been changed
  720.             when a valid record has been read.  The return value  is  the
  721.             length  of  the  record  plus the length of the End-Of-Record
  722.             plus 1. 
  723.             
  724.         26.  Fixed length records can be read by  setting  the  value  of
  725.             RECLEN appropriately. 
  726.             
  727.         27.  Fixed  width  fields  are  supported by setting the value of
  728.             FIELD_WIDTHS appropriately. 
  729.             
  730.         28.  Corrected  admitted  problems  with   Awk.    The   problems
  731.             mentioned  on page 182 of "The Awk Programming Language" have
  732.             been corrected.  Specifically:
  733.             a)  true  multidimensional  arrays  have  been   implemented,
  734.                 
  735.             b)  the  'getline'  syntax  has  been  made  to match that of
  736.                 other functions,
  737.                 
  738.             c)  declaring local variables in user-defined  functions  has
  739.                 been corrected,
  740.                 
  741.             d)  intervening  blanks are allowed between the function call
  742.                 name and the opening parenthesis (in fact, under QTAwk it
  743.                 is permissible to have no opening parenthesis or argument
  744.                 list for user-defined functions that  have  been  defined
  745.                 with no formal arguments). 
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.         QTAwk                        - 13 -                         QTAwk
  755.