| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Hi, What does the POSIX Standard for awk say about coercion as described on pages 44-45 of The Awk Programming Language book (1988, Aho, Weinberger, Kernighan)? I.e., "" variable is treated as a string, 0 + variable is treated as a number. Thanks. Bill Seivert |
|
#2
| |||
| |||
| In article <Hfednfs1E7jyQl_VnZ2dnUVZ_qfinZ2d@comcast.com>, William Seivert <bill80126@comcast.net> wrote: >Hi, > >What does the POSIX Standard for awk say about coercion as described on >pages 44-45 of The Awk Programming Language book (1988, Aho, Weinberger, >Kernighan)? > >I.e., "" variable is treated as a string, 0 + variable is treated as a >number. > >Thanks. >Bill Seivert Have you just answered your own question? |
|
#3
| |||
| |||
| William Seivert wrote: > What does the POSIX Standard for awk say about coercion as described on > pages 44-45 of The Awk Programming Language book (1988, Aho, Weinberger, > Kernighan)? http://www.opengroup.org/onlinepubs/...ities/awk.html > > I.e., "" variable is treated as a string, 0 + variable is treated as a > number. "An application can force an expression to be treated as a number by adding zero to it, or can force it to be treated as a string by concatenating the null string ( "" ) to it. |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.