|
From: sfeam <eam...@gm...> - 2015-08-03 01:39:26
|
On Sunday, 02 August 2015 05:43:48 PM BBands wrote: > 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. There is no problem with iso format dates or indeed with any date/time formats. The time format routines strptime, strftime, etc do not interpret leading zeros as indicating an octal number. The issue only arises for integer assignment, not dates. > 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. If it's in back-tics, it's being interpreted by the shell, not by gnuplot. So that particular example says nothing about how gnuplot processes month numbers. Ethan > > > > 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? > > > ------------------------------------------------------------------------------ > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info |