New built-in sequences



next up previous
Next: Data types and Up: Release of Patchy version Previous: Handling of include

New built-in sequences

The new sequences +QFxxxx get components of the Pam file header line with this general syntax:

   +SEQ, QFxxxx, S=sym, L=lim, N=n  .txa?txe
Such a sequence call will expand into one line of text starting with the text "txa" given in the comment field, with leading blanks significant, followed by the "value" substituted for the escape symbol (here and by default "?"), followed by the text "txe" (if any).
         With S=sym the escape symbol can be specified, default "?".

         With L=lim the length of the value string can be limited,
         default is the 'natural length' of the item, which for QFHEAD
         includes the file ID, the version, date and time of the file.

         With N=n the ordinal number of the Pam file whose header line
         is to be used can be selected, default: the current Pam file.
  1. Get the Pam file header line as is:
       +SEQ, QFHEAD, ...
    
             Example: +SEQ, QFHEAD  .      DATA VIDQQ /'@(#)?>'/
          might give:       DATA VIDQQ /'@(#)WYLBUR  1.08 /7  920229 12.00>'/
  2. Get the Pam file identifier:
       +SEQ, QFNAME, ...
    
             Example: +SEQ, QFNAME  .      CHID = '?'
          might give:       CHID = 'WYLBUR'
  3. Get the version as a text string:
       +SEQ, QFVERS, ...
    
             Example: +SEQ, QFVERS  .      CHVERS = '?'
          might give:       CHVERS = '1.08 /7'
  4. Get the version as a number:
       +SEQ, QFVSNUM, ...
    
             Example: +SEQ, QFVSNUM  .      int pamvers = ?;
          might give:       int pamvers = 10807;
  5. Get the primary version number:
       +SEQ, QFVPRIM, ...
    
             Example: +SEQ, QFVPRIM, S=@  .      NUMVERS = @ * 100.01
          might give:       NUMVERS = 1.08 * 100.01
  6. Get the secondary version number:
       +SEQ, QFVSEC, ...
    
             Example: +SEQ, QFVSEC, S=@  .      NUMALL = 1000*NUMVERS + @
          might give:       NUMALL = 1000*NUMVERS + 7
  7. In the same spirit, the new sequences QDATE and QTIME give the date and the time of the Patchy run not neccesarily tied to Fortran:
    +SEQ, QDATE, S=sym  .txa?txe
    
             Example: +SEQ, QDATE   .      PARAMETER (IPDATE=?)
          might give:       PARAMETER (IPDATE=19920229)
    
    +SEQ, QTIME, S=sym  .txa?txe
    
             Example: +SEQ, QTIME   .#define now ?
          might give: #define now 2204

  8. The new sequence QENVIR calls for substitution of an environment variable into the source statement given:
    +SEQ, QENVIR  .statement
    
             Example: +SEQ, QENVIR  .      PARAMETER (DIR='${DIR}/')
          might give:       PARAMETER (DIR='/cern/dev/')


@Thu Oct 6 15:53:34 MET 1994