Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

I want time!, not string!

 [1/5] from: hallvard:ystad:oops-as:no at: 18-Feb-2004 23:30


Hello I have a funny problem. I have this: s: now/time/precise [...] print join "Took" (now/time - s) But sometimes, 's turns out to be a string! How can that happen?? The script is too long for me to pass on the full context. But has anyone seen this (is it a?) bug before? Thanks for any help, HY

 [2/5] from: ingo:2b1 at: 18-Feb-2004 23:51


Hi Hallvard, I haven't seen this exact error before, but some that have been alike ... my guess is that somehow s gets set somewhere else in [...]. Did you try to protect 's directly after setting it? If you still get the same error, there must be a bug in now/time/precise I hope that helps, Ingo Hallvard Ystad wrote:

 [3/5] from: g:santilli:tiscalinet:it at: 19-Feb-2004 10:32


Hi Hallvard, On Wednesday, February 18, 2004, 11:30:04 PM, you wrote: HY> I have a funny problem. I have this: HY> s: now/time/precise HY> [...] HY> print join "Took" (now/time - s) HY> But sometimes, 's turns out to be a string! How can that happen?? HY> The script is too long for me to pass on the full HY> context. But has anyone seen this (is it a?) bug before? I don't know of any bugs like this in NOW. AFAIK NOW/TIME/PRECISE will *always* return a TIME! value. Maybe you forgot to make S local to some function and are overwriting it? You could try to rename it to START-TIME or something more difficult to reuse by accident. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/

 [4/5] from: inetw3:mindspring at: 19-Feb-2004 22:06


Hi Hallvard, look at >> HELP JOIN ARGUMENTS: value -- Base value (Type: any) rest -- Value or block of values (Type: any) whatever type? the first value is (the Base value), the second argument (the rest) will adopt it's type?. in your case *print join "Took" * is a string so, *s* will allways be a string. it's not a bug.

 [5/5] from: hallvard:ystad:oops-as:no at: 20-Feb-2004 9:19


Dixit iNetW3 (05.06 20.02.2004):
>Hi Hallvard, >look at >> HELP JOIN >whatever type? the first value is (the Base value), >the second argument (the rest) will adopt it's type?. > in your case *print join "Took" * is a string >so, *s* will allways be a string. it's not a bug.
Hi iNetW3, True, the 'join behaviour is not a bug, but my initial problem was that 's became a string _before_ 'join could ever be evaluated. Now/time - s crashed. Turned out to be the mysql protocol that used the global word 's. Problem is fixed (cf. earlier on in this email thread). Thanks for your help anyway. HY