PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: #Unknown Commands[Next]: <??Variable>
\ -> Standard Definitions

Standard Definitions

There are a number of "standard" definitions which have been predefined and can be placed almost anywhere in your source code. The variable names can be specified in any case. They are:

  1. <??Variable>
  2. <?=RexxExpression>
  3. <?/>
  4. <?_>
  5. <?..>
  6. <?BaseDir>
  7. <?CgiStart>
  8. <?CmdLineTotal>
  9. <?CompileTime>
  10. <?Ctext.EXE>
  11. <?Data>
  12. <?DebugOn>
  13. <?DirSlash>
  14. <?Dollar>
  15. <?Hash>
  16. <?HashPrefix>
  17. <?IncludeLevel>
  18. <?InputComponent>
  19. <?InputComponentLine>
  20. <?InputComponentTime>
  21. <?InputFile>
  22. <?InputFileTime>
  23. <?LessThan>
  24. <?NewestFileDateTime>
  25. <?NewLine>
  26. <?NewLine?>
  27. <?NewLineInMacro>
  28. <?OpSys>
  29. <?OpSysSpecific>
  30. <?OutputFile>
  31. <?OutputLevel>
  32. <?OutputLine>
  33. <?PpwizardAuthor>
  34. <?PpwizardAuthorBaseWebDir>
  35. <?PpwizardAuthorEmail>
  36. <?PpwizardAuthorHomePage>
  37. <?PpwizardGeneratorMetaTags>
  38. <?PpwizardHomePage>
  39. <?PpwizardPgm>
  40. <?ProcessingMode>
  41. <?ProtectFromPpwStart>
  42. <?ProtectFromPpwEnd>
  43. <?QuestionMark>
  44. <?RestartLine>
  45. <?RexxSkip>
  46. <?RexxSkipTo>
  47. <?SemiColon>
  48. <?Space>
  49. <?SyntaxCheck>
  50. <?SyntaxCheckOff>
  51. <?TemplateDataFile>
  52. <?TmpDir>
  53. <?TotalOutputLines>
  54. <?Unique>
  55. <?Version>
  56. <?xXX>

Hopefully you have noticed that quite a few of the REXX calls can easily be called using the "<?=RexxExpression>" format listed above.

Note that you can define your own variations of "standard" variables with the "#evaluate" command, for example, to create an alternative way to display the Compile Time.

Symbol Parameters

Some of the symbols take parameters (usually optionally), if they do then these follow a ":" (colon).

If a parameter is supplied then there must be no spaces from the start of the symbol to the end of the parameter. Some valid examples:

   <?InputComponent:EXTN>
   <?InputFileTime:%T>

If you supply a parameter where none is required a fatal error will result.

EXAMPLES OF CREATING VARIABLES

;--- Capture some HTML output file information ------------------------------
#evaluate ShortNameHtml            "FilePart('name', '<?OutputFile>')"  ;; Reference standard definition.
#evaluate ShortNameHtmlLowerCase   "translate('<$ShortNameHtml>', 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"

;--- Capture date/time information (<$DateTime> --> Friday March 27 1998 at 7<$colon>46pm ---
#evaluate DateTime @date('WeekDay') || ' ' || date('Month') || ' ' || substr(date('Sorted'), 7, 2) || ' ' || left(date('Sorted'), 4) || ' at ' || time('Civil')@

;--- Determine the current directory ----------------------------------------
The current directory is "<?=directory()>".                              ;; Shorthand invocation of REXX function.

;--- Create YY.DDD Version # (example "98.107") --------------------------------------
#evaluate YYDDD    ~substr(date('Sorted'),3,2) || '.' || date('Days')~
   ;--- Outputs the size of a file (takes parameter "File") --------------------
   #( ''
       #define SizeOfFile
       #evaluate+  LocalFileName    ^ReplaceString("../{$File}", "/", "\")^
       #DependsOn  INPUT            "<$LocalFileName>"
       #evaluate+  TmpFileSize      ^FileQuerySize("<$LocalFileName>")^
       #if "<$TmpFileSize>" = ""
           #error $Failed getting size of "<$LocalFileName>"$
       #endif
       <$TmpFileSize $$AddComma>
   #)
   #define SizeOfFileInSmallFont   <FONT SIZE=-1>{$Before=""}<$SizeOfFile File=*{$File}*> bytes{$After=""}</FONT>
   #define (SizeOfFileInSmallFont) <$SizeOfFileInSmallFont File=*{$File}* Before='(' After=')'>
   ;--- Outputs the date (Ausi format... YES!) (takes parameter "File") --------
   #define DateOfFile                                                                                                                                \
           #evaluate+  LocalFileName    ^ReplaceString("../{$File}", "/", "\")^                                                                      \
           #DependsOn  INPUT            "<$LocalFileName>"                                                                                           \
           #evaluate+  TmpFileTime      ^stream("<$LocalFileName>", "c", "query datetime")^                                                          \
           #if "<$TmpFileTime>" = ""                                                                                                                 \
               #error $Failed getting date/time of "<$LocalFileName>"$                                                                               \
           #endif                                                                                                                                    \
           #evaluate+ TmpFileDate       ~substr('<$TmpFileTime>', 4, 2) || '/' || left('<$TmpFileTime>', 2) || '/' || substr('<$TmpFileTime>', 7,2)~ \
           <$TmpFileDate>
   #define DateOfFileInSmallFont   <FONT SIZE=-1>{$Before=""}<$DateOfFile File=*{$File}*>{$After=""}</FONT>


email me  any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Search][Prev]: #Unknown Commands[Next]: <??Variable>


PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Sunday November 05 2017 at 10:00am