[Top][All Lists]

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

how to get an unassigned value?

From: Peng Yu
Subject: how to get an unassigned value?
Date: Fri, 25 Jun 2021 15:09:02 -0500

I see the following two ways of getting an unassigned value. But
neither of them is in the = form.

$ awk -e 'function f() { }; BEGIN { x= f(); print typeof(x) }'
$ awk -e ' BEGIN { a[1]; x=a[1]; print typeof(x) }'

So there is not a way to write something like `x =
some_way_to_represent_an_unassigned_value` to assign an assigned value
to a variable?

The following is cumbersome they required an extra definition of
function of array. I am looking for a better way to express an
unassigned value.

x = f()
x = a[1]


reply via email to

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