help-gawk
[Top][All Lists]
Advanced

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

How to convert a string to strnum?


From: Peng Yu
Subject: How to convert a string to strnum?
Date: Sat, 4 Sep 2021 08:09:54 -0500

https://www.gnu.org/software/gawk/manual/html_node/Variable-Typing.html

$ awk -e 'BEGIN { x="1e6"; print typeof(x), typeof(strtonum(x)) }'
string number

I can only convert a string to a number. But I don't find a way to
convert a string to a strnum. Is there a way to do so?

-- 
Regards,
Peng



reply via email to

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