[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gawk] optional strict gawk semantics
From: |
Assaf Gordon |
Subject: |
[bug-gawk] optional strict gawk semantics |
Date: |
Thu, 14 Aug 2014 17:02:59 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 |
Hello Arnold and all,
I'd like to ask your opinion about an idea I've been toying around with,
regarding gawk.
I'm looking for a way to make gawk stricter with regards to input validation
(but preferably doing so 'automatically', ie not adding explicit awk code).
Specifically, I'd like to trigger an error when:
1. running numeric operation on a string value (one that can't be converted to
a number)
2. when accessing a field number which doesn't exist (e.g. "$5" when the input
has only 3 columns).
3. When accessing an array with a non-existing index
Do you think such addition is possible in current gawk?
And would you consider such feature for inclusion (enabled with a command-line
option of course) ?
If so I could try to come up with a patch.
Thanks,
- Assaf
- [bug-gawk] optional strict gawk semantics,
Assaf Gordon <=