bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] Is it possible to delete an array name?


From: arnold
Subject: Re: [bug-gawk] Is it possible to delete an array name?
Date: Thu, 29 Nov 2018 00:42:30 -0700
User-agent: Heirloom mailx 12.4 7/29/08

> I don't see a way to delete a hash variable as I may want to use it as
> a scalar later on. Is it possible in gawk?

No, it's not possible. This too is very clearly documented in the manual.

> $ awk -e 'BEGIN { d[1]=""; delete d; d=1}'
> awk: cmd. line:1: fatal: attempt to use array `d' in a scalar context

If you want duck typing, use Python.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]