Re: Invalid Time with SDFiler 1.0



On Sep 23, 7:42 pm, TW <timwess...@xxxxxxxxx> wrote:
The file was created directly onto :3: using the ARCHIVE command. My
guess is that the time was somewhere between 17:04:59.5 and 17:50:00.0
and that bad rounding took place. In any case, perhaps the seconds
field could be MOD 60 to prevent it from crashing the filer.

Maybe. If I remember right the source is included. . . so go right
ahead. :-)

TW

Actually, I tried before I posted, but frankly, looking at the source
code was a humbling experience. But after your encouragement, I
decided to try again. I couldn't figure out why the string "invalid
time" wasn't anywhere in your source till I realized that it was
coming from the TOD>t$ function. With that missing link, I inserted
the following above the only call to TOD>t$ in broswer.S

For all you sysRPL experts, consider the following more of a proof of
concept. I'm sure it can be improved considerably, but it does fix
the problem.

---------------------------------------------------------------------
(
In case the file timestamp has an invalid seconds field such as
17.0460, as has been know to happen, use MOD 60 on the seconds.
Convert h.mmSS -> h.mmss
)
DUP ( h.mmSS h.mmSS )
%2
TRCXY ( h.mmSS h.mm )
SWAP ( h.mm h.mmSS )
% .01
%MOD ( h.mm 0.00SS )
% .006
%MOD ( h.mm 0.00ss )
%+ ( h.mmss )
( end of modifications )

TOD>t$

---------------------------------------------------------------------

No doubt, it would be better to make this change in SDLIB instead.

from
value=tdate.tm_sec+tdate.tm_min*100+tdate.tm_hour*10000;

to
value=tdate.tm_sec%60+tdate.tm_min*100+tdate.tm_hour*10000;


-wes

.



Relevant Pages

  • Invalid cast when trying to reference a database column...
    ... theField = reader.GetString; ... the first line is crashing my program. ... it complains about an invalid ...
    (microsoft.public.dotnet.languages.csharp)
  • IE keeps crashing w/error message
    ... IE keeps crashing, and I get this error message (as well as ... EXPLORER caused an invalid page fault in ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • illegal error
    ... helps collating data. ... it keeps crashing and gives a kernel32.dll error ... EXCEL caused an invalid page fault in ...
    (microsoft.public.excel)

Loading