Home > Archive > AWK > April 2005 > Re: Problem with double precision numbers
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: Problem with double precision numbers
|
|
| Patrick TJ McPhee 2005-04-08, 8:56 pm |
| In article <4c59890.0504050212.92e425f@posting.google.com>,
Itaca <mazacar@hotmail.com> wrote:
[...]
% I want to substract 24 to the first field of each register. For this
% purpose i have used the following sentence:
%
% awk -F, '{$1=$1-24; print $0}' archive
This should give a floating-point result for the first field.
What awk are you using?
--
Patrick TJ McPhee
North York Canada
ptjm@interlog.com
| |
| Brian Inglis 2005-04-09, 3:55 pm |
| On Wed, 06 Apr 2005 08:45:27 -0500 in comp.lang.awk, Ed Morton
<morton@lsupcaemnt.com> wrote:
>Itaca wrote:
>
>Is it possible that this is a locale issue? Maybe your locale is set to
>something unexpected and gawk 3.1.1 was ignoring it but gawk 3.1.3 is
>using it correctly. Just a guess. Take a look at
>http://www.gnu.org/software/gawk/ma...wk.html#Locales for some more
>info on locales.
Looks like you made a good catch: the OP's awk seems to be 
between period and comma, maybe because comma is the locale decimal
point, as in most non-English locales, where semicolon fills the role
in lists which use comma in English locales.
--
Thanks. Take care, Brian Inglis Calgary, Alberta, Canada
Brian.Inglis@CSi.com (Brian[dot]Inglis{at}SystematicSW[dot]a
b[dot]ca)
fake address use address above to reply
|
|
|
|
|