Re: integer value too large?



On Apr 29, 12:02 am, Mark Janssen <mpc.jans...@xxxxxxxxx> wrote:
On Apr 28, 11:34 pm, tickle007 <tickle_b...@xxxxxxxxx> wrote:

On Apr 28, 5:00 pm, Mark Janssen <mpc.jans...@xxxxxxxxx> wrote:

What is your Tcl version? If it is 8.4 the value in $wait_time might b
too large. Also you probably dont want the [...] but {...} but this is
impossible to say without knowing what ... is.

Can you put the whole script (or a couple of lines around this command
it the whole script is too large) to give us some more info as to why
it fails?

This is on an ActiveState 8.4 version of Tcl on Windows XP.
Apparently, the value in the "after" amount is too big. We traced the
error. A span of about 8 months was converted to milliseconds. This
was first seen by a QA analyst where they are supposed to enter a few
minutes, but they entered a few months.

Is there a limit on how frequently after the command works?

There is no (imposed) limit on the frequency of after, there is
however a limit on the maximum of milliseconds you can specify for
after. The actual limit depends on your system (32 or 64 bit)
You can check in your script if the number is within limits for
validation, by using

string is integer $wait_time

which will return 1 if the value is in range. On my system the max
number of milliseconds is 2^32-1 (which equals approximately 50 days).

Mark

I forgot to mention that in 8.5 the range has been extended to a wide
integer (which can be checked by [string is wideinteger]) which
extends the range of ms to 2^64-1 which would allow you to schedule
events after the big crunch.

Mark

.



Relevant Pages

  • Re: How to rewrite with awk?
    ... > I'm unfamiliar with tools such as sed & awk. ... Extract the string that matches a RE. ... This script will not only expand all the lines that say "include ... file) and not resetting ARGV(the tmp file), it then lets awk do any ...
    (comp.unix.shell)
  • Re: Slow string
    ... I see virtually no difference in execution time for the code you posted when using cscript versus using wscript; to confirm, I bracketed the code with an initial ... Are you actually entering the script name into a console window? ... You can use the exact same line for every wrapper script - and that includes wsf and js scripts; all you need to do is change the final "vbs" to "wsf" or "js" as appropriate. ... If you build a large string by small concatenations, the performance degrades geometrically - so does array resizing, because they both use the same nasty technique inherited from VB1 of copying the entire data structure to a new structure with the added element. ...
    (microsoft.public.scripting.vbscript)
  • Re: Function that returns date of file.
    ... string after the date/time when it is used by itself. ... Is that your entire script? ... I make an IF statement that required the 'equals equals'. ... designed database your job will be all that much harder. ...
    (alt.php)
  • Re: Script: Remote shutdown of all domain computers
    ... When trying to run the script from a XP workstation, where i am logged in as ... Dim strBase, strFilter, strAttributes, strQuery, objRecordSet ... 2000 or above and allow shutdown, ... Public Function AllComputersAs String() ...
    (microsoft.public.windows.server.scripting)
  • Re: Update Notes Field
    ... I was able to run the script without any problems. ... The info attribute can be assigned a value when the user object is created, but I don't see where dsadd can do it. ... Most attributes are string values, and VBScript strings can include the character vbCrLf. ... If there is another way to add the information to the Notes field, ...
    (microsoft.public.windows.server.active_directory)