[Top][All Lists]

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

Re: How to check if a field is a number (integer or float)?

From: Peng Yu
Subject: Re: How to check if a field is a number (integer or float)?
Date: Sun, 20 Jun 2021 07:54:21 -0500

> This is exactly correct. As you have been told many times: Read The Manual
> and then you will no longer need to ask questions here. This will save
> time for you, me and everyone else on this list.

That is not correct. Reading the manual is not sufficient to ensure a
solution is 100% correct. There can be always corner cases that only
somebody who is familiar with the awk internal can be sure about.
Otherwise, there wouldn't be so many partially correct solutions
floating no the web.

>> The best solution that I figured out is just `typeof(x) == "strnum"`||
>> typeof(x) == "number"` instead of using regex.
> That should work.

See, if this is disagreed by the next reply.


reply via email to

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