I have started a repository called Enhanced GNU Awk.
https://www.kylheku.com/cgit/egawk/about/
This adds true local variables to Gawk, in the form of a @let
construct. @let is block scoped, not function scoped, and
may be used outside of functions, e.g.
BEGIN {
@let (here_only = 42) {
print here_only
}
}
I need this for the cppawk project, which has macros. macros sometimes
need hidden temporary variables. It's very bad if these are global.
I have started a repository called Enhanced GNU Awk.
https://www.kylheku.com/cgit/egawk/about/
This adds true local variables to Gawk, in the form of a @let
construct. @let is block scoped, not function scoped, and
may be used outside of functions, e.g.
BEGIN {
@let (here_only = 42) {
print here_only
}
}
I need this for the cppawk project, which has macros. macros sometimes
need hidden temporary variables. It's very bad if these are global.
On 13.04.2022 03:50, Kaz Kylheku wrote:
I have started a repository called Enhanced GNU Awk.
https://www.kylheku.com/cgit/egawk/about/
This adds true local variables to Gawk, in the form of a @let
construct. @let is block scoped, not function scoped, and
may be used outside of functions, e.g.
BEGIN {
@let (here_only = 42) {
print here_only
}
}
I need this for the cppawk project, which has macros. macros sometimes
need hidden temporary variables. It's very bad if these are global.
Understood.
Are GNU Awk Namespaces[*] not sufficient to address the problem?
On 4/12/2022 8:50 PM, Kaz Kylheku wrote:
I have started a repository called Enhanced GNU Awk.
https://www.kylheku.com/cgit/egawk/about/
This adds true local variables to Gawk, in the form of a @let
construct. @let is block scoped, not function scoped, and
may be used outside of functions, e.g.
BEGIN {
@let (here_only = 42) {
print here_only
}
}
I need this for the cppawk project, which has macros. macros sometimes
need hidden temporary variables. It's very bad if these are global.
Much like the now ancient "New awk", nawk, "Enhanced awk" isn't a great
name as it could be used for any project that adds functionality and
Maybe you could follow in the footsteps of Mike's Awk, mawk, and
Thompson's awk, tawk, and name this Kaz/Kyheku's awk, kawk? Or maybe
On 2022-04-13, Ed Morton <morto...@gmail.com> wrote:<snip>
Maybe you could follow in the footsteps of Mike's Awk, mawk, and Thompson's awk, tawk, and name this Kaz/Kyheku's awk, kawk? Or maybeIn today's prudish social justice environment teeming with snowflakes
who are perpetually on the verge of tears, "kawk" would likely
be regarded in many projects as a "CoC" violation.
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 793 |
Nodes: | 10 (1 / 9) |
Uptime: | 40:04:28 |
Calls: | 11,106 |
Calls today: | 3 |
Files: | 186,086 |
Messages: | 1,751,481 |