PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: GetImageHeightWidth()[Next]: GetLineBeingProcessed()
\ -> Rexx -> Inbuilt PPWIZARD Functions -> GetInputFileNameAndLine()


This is an inbuilt function function provided by PPWIZARD.

This function takes no parameters and returns information about the current "location". It reports the current line number and file being processed. This information is already available in other forms (<?InputComponent> & <?InputComponentLine>) however this routine simplifies getting it into a nicely formatted output.

If you are interested in this call you should probably also check out the GetFileLineBeingProcessed() and GetLineBeingProcessed() calls.


This example has been extracted out of the standard PPWIZARD header file NESTCHK.H which can detect and report details of nesting errors such as forgetting a "</TABLE>" tag.

#DefineRexx NestingInc_REXX
            ;--- Ensure ID is valid -------
            if symbol('{$ID $$SQx2}_Level') <> 'VAR' then
               Error('The ID of "{$ID $$SQx2}" is unknown (you must use "NestingInit")!');

            ;--- Increase nesting level ---
            call _valueS "{$ID}_Level", {$ID}_Level + 1;

            ;--- Record details about current location ---
            call _valueS "{$ID}_FilePosn.{$ID}_Level", GetInputFileNameAndLine();
            call _valueS "{$ID}_CurrLine.{$ID}_Level", GetFileLineBeingProcessed();
#define NestingInc                                            \
        #evaluate  '' ^<$NestingInc_REXX ID='{$ID}'>^

The reported output (on nesting errors) looks something like:

Missing 2 end nesting tags on "HTML TABLE tag"
  * line 8 of "E:\DB\PROJECTS\OS2\ppwizard\1.in"
    <<$TABLE> COLS=1 blah blah>
  * line 9 of "E:\DB\PROJECTS\OS2\ppwizard\1.in"
    <<$TABLE> COLS=2 blah blah>

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

[Top][Contents][Search][Prev]: GetImageHeightWidth()[Next]: GetLineBeingProcessed()

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