Re: What value can cause this error?

Liste des GroupesRevenir à cl tcl 
Sujet : Re: What value can cause this error?
De : alexandru.dadalau (at) *nospam* meshparts.de (alexandru)
Groupes : comp.lang.tcl
Date : 18. Sep 2024, 00:16:56
Autres entêtes
Organisation : novaBBS
Message-ID : <c46c7364fa16219ef4585e3c46918ba7@www.novabbs.com>
References : 1 2
User-Agent : Rocksolid Light
Actually yes, I'm sure.
I have the errorInfo that shows the stack of procedure calls.
The procedure is called with "decimals" equal to 6.
The the error is thrown.
The errorInfo does not show the value of variable arguments, so I don't
know that "val" was.
I also checked my source code an all the calls to that procedure never
use higher values than 6 for the second argument.
Here is the complete procedure:
proc NumberReadmm {val {decimals 3}} {
  if {![string is double -strict $val]} {
    return $val
  }
  return [expr {round($val*(10.0**($decimals+3)))/(10.0**$decimals)}]mm
}
Here is the errorInfo:
*** ERROR ***
Time: Monday, das 16 von September, 2024, um 13:24:37
integer value too large to represent
    while executing
"expr {round($val*(10.0**($decimals+3)))/(10.0**$decimals)}"
    (procedure "NumberReadmm" line 5)
    invoked from within
"NumberReadmm $contact_offset 6"
    (procedure "ContactOffsetFormat" line 7)
    invoked from within
"ContactOffsetFormat $contact_offset_min"
    (procedure "UIRelationApplyContactOffset" line 45)
    invoked from within
"UIRelationApplyContactOffset %W"
    invoked from within
".valid.notebook.f5.buttons.b2 invoke "
    invoked from within
".valid.notebook.f5.buttons.b2 instate !disabled {
valid.notebook.f5.buttons.b2 invoke } "
    invoked from within
".valid.notebook.f5.buttons.b2 instate pressed {
valid.notebook.f5.buttons.b2 state !pressed;
valid.notebook.f5.buttons.b2 instate !disabled { .valid..."
    (command bound to event)

Date Sujet#  Auteur
17 Sep 24 * What value can cause this error?7alexandru
17 Sep 24 `* Re: What value can cause this error?6Rich
18 Sep 24  `* Re: What value can cause this error?5alexandru
18 Sep 24   `* Re: What value can cause this error?4Rich
18 Sep 24    `* Re: What value can cause this error?3alexandru
18 Sep 24     `* Re: What value can cause this error?2Christian Gollwitzer
20 Sep 24      `- Re: What value can cause this error?1alexandru

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal