• @include useful features: PROCINFO[ "include" ] array

    From Digi@21:1/5 to All on Thu Jan 6 14:45:21 2022
    hello!

    i know that there is no more gawk feature request like topic. so i'm just voicing my thoughts.

    it's will be nice if gawk script may gets full filepath of the every files that was @included

    like if PROCINFO[ "include" ] is the predefined subarray containing as the indexes full filepaths of the all files included.

    some of my libraries needs to load and process some files during initialization.

    the files are logically located at the same location as the file included. this will lead to problems with runing my scripts from non-hardcoded locations.

    if such kind include-file list will be provided by gawk the library's initializations may find itself in this list and then just get location of the file required

    and it is possible that dynamic extensions also may needs such kind feature.


    also:

    it's will be very useful and whats more important - more correct if for @include directives located in a file the current directory will be directory from where file was been loaded - not the user's current folder as it's currently in gawk.

    many of my include files contains nested subincludes that should loaded exactly from where original include file was get.

    also:

    it's will be nice if @include directive may support access to environment variables like it's realized in batch files:

    @include "%AWKPATH%/arr/arr.inc"


    Best Regards
    Denis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ed Morton@21:1/5 to Digi on Thu Jan 6 17:27:18 2022
    On 1/6/2022 4:45 PM, Digi wrote:
    hello!

    i know that there is no more gawk feature request like topic. so i'm just voicing my thoughts.

    Not sure what that means but you can contact the gawk developers about
    non-bug issues by emailing them at "help dash gawk at gnu dot org".

    See https://www.gnu.org/software/gawk/manual/gawk.html#Asking-for-help
    for more info.

    Ed.


    it's will be nice if gawk script may gets full filepath of the every files that was @included

    like if PROCINFO[ "include" ] is the predefined subarray containing as the indexes full filepaths of the all files included.

    some of my libraries needs to load and process some files during initialization.

    the files are logically located at the same location as the file included. this will lead to problems with runing my scripts from non-hardcoded locations.

    if such kind include-file list will be provided by gawk the library's initializations may find itself in this list and then just get location of the file required

    and it is possible that dynamic extensions also may needs such kind feature.


    also:

    it's will be very useful and whats more important - more correct if for @include directives located in a file the current directory will be directory from where file was been loaded - not the user's current folder as it's currently in gawk.

    many of my include files contains nested subincludes that should loaded exactly from where original include file was get.

    also:

    it's will be nice if @include directive may support access to environment variables like it's realized in batch files:

    @include "%AWKPATH%/arr/arr.inc"


    Best Regards
    Denis


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)