|
From: BBands <bb...@gm...> - 2015-08-03 00:43:55
|
It seems that the leading zero causes octal interpretation. I have no
problem with that, but as with floor division, another unexpected result by
most users, I think gp should at least warn. I know HBB will disagree, and
I understand his point, so perhaps the warnings could be switched off by an
'expert' compilation flag. Or the behaviors could be switched on and off
within the program??? Or a unique delimiter like '/' could be used. Feel
free to lynch, but I think that we ought to try for expected results, not
iso format dates for the first eight months of the year being converted to
octal. Python took floor division on, so perhaps we should too?
John
On Sun, Aug 2, 2015 at 4:31 PM, Dave Horsfall <da...@ho...> wrote:
> Version 5.0 patchlevel 1 last modified 2015-06-07
>
> I've just spotted a weird problem in one of my scripts. I'm manipulating
> the date, and I have the line "month = `date +%m`" to extract the month as
> a number.
>
> Come August, and it appears as:
>
> gnuplot> month = 08
> ^
> "health.gp", line 51: unexpected or unrecognized token
>
> My guess is that "08" is being parsed as an octal number, and hence
> invalid; I could've sworn that this was working last year...
>
> Anyone else seeing this?
>
|