bug-gnu-utils
[Top][All Lists]
Advanced

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

problem in GNU Awk 3.1.3 - comparison does not work


From: Thomas Strasser
Subject: problem in GNU Awk 3.1.3 - comparison does not work
Date: Sun, 11 Apr 2004 01:27:23 +0200 (MEST)

Dear Sir or Madam!

The following program has a problem in the comparsion: 

#!/bin/bash
# using 'GNU Awk 3.1.3' from cygwin-package
echo "   Samstag, 10.4.2004" | gawk '{
}
function myfunc(sdate)
{
   split(sdate, sa, "\\.");
   lmonth = sprintf("%d", sa[2]);   # get 4
printf("+++lmonth is \"%d\";\n", lmonth); # => output: +++lmonth is "4";
   if ( lmonth > 12 ) # BUG: this should be false, but is true!!!
{
printf("+++month:=%d>12!\n", lmonth); # => output: +++month:=4>12!
      return 0;
}
else
  printf("+++month:ok;\n");
}
{ myfunc($2);
}'

If there are any information you need, feel free to write me an answer.

Yours sincerely
     Thomas Strasser

-- 
NEU : GMX Internet.FreeDSL
Ab sofort DSL-Tarif ohne Grundgebühr: http://www.gmx.net/info





reply via email to

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