bug-oleo
[Top][All Lists]
Advanced

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

1.99.16 - strftime - expansion of the % character


From: Kev Buckley
Subject: 1.99.16 - strftime - expansion of the % character
Date: Wed, 16 Jan 2002 17:23:14 +0000 (GMT)

Apologies for not having trawled through the oleo code yet but I
wanted to flag thsi up and see if you alreayd have a fix as I cant
believe you wont have had this one already posted.

I Enter the following into a cell
 
  @strftime("%d-%b-%Y", @ymd(2002, 1, 14))

so that it displays  

  14-Feb-2002

Oleo automatically displays teh contents of that cell in the staus line as


    A1 "14-Feb-2002"address@hidden("%%d-%%b-%%Y", @ymd(2002, 1, 14))]

When I save the spreadshet, the top of oleo file shows:

# format 2.1 (requires Oleo 1.99.9 or higher)
F;DGFL8
O;auto;background;a0;ticks 1
C;c1;r1;Estrftime("%%d-%%b-%%Y", ymd(2002, 1, 14));K"14-Feb-2002"
O;status 2
W;N1;A1 1;C7 0 7;Ostandout
GDx""
GDy""
Gt0
 and so on

when I read it back in the status line now shows

  A1 "14-Feb-2002"address@hidden("%%%%d-%%%%b-%%%%Y", @ymd(2002, 1, 14))]

This is OK initially, as the constant value from the K"14-Feb-2002"
field in the external file gets shown in the spreadsheet - but
problems arise if you edit the args to the ymd function, because the
strftime fails (with good reason I reckon) to interpret the multiple
%s in its format argument on recalculation and shows:

  %%d-%%b-%%Y

OK, my guess is that whatever code parses the cell entries is missing
the fact that the % characters are inside a "" pair and is expanding
them.

So, is this a "known" bug ?

Once I realised what was happening, it has become faily easy to alter
the external file to remove the spurious %s and, as the args to the
ymd function are still preserved, it loads OK again next time around.


For info I'm running 

oleo-1.99.16 (in a terminal window)

on a LinuxFromScratch-type installation that currently has a 2.4.16
kernel with glibc-2.1.3

As I say, I will try and take a look at the oleo code at some point,
assuming this hasn't already been fixed.

All the best for now,
Kevin

-- 
Regards,

----------------------------------------------------------------------
*  Kevin M. Buckley              e-mail: address@hidden   *
*                                                                    *
*  Systems Administrator                                             *
*  Computer Centre                                                   *
*  Lancaster University          Voice:  +44 (0) 1524 5 93718        *
*  LANCASTER. LA1 4YW            Fax  :  +44 (0) 1524 5 25113        *
*  England.                                                          *
*                                                                    *
*  My PC runs Linux/GNU, you still computing the Bill Gate$' way ?   *
----------------------------------------------------------------------



reply via email to

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