I recently installed a suite of programmes on to a new PC which
has an Intel dual core processor.
One of the main progs is suffering an error #6 (Overflow) and
I have narrowed it down to the following SUB. For testing
purposes I have remmed out the CALL statement in the programme
and substituted the SUB's code inline.
The programme succesfully executes the code after "next line
1st" (ie it is a number) therefore passes to the line after
"next line 2nd".
Before executing "next n" I have printed "amt$" which is still
"2" but printing "n" causes an ERR #6 (n is an integer) and it
appears that the value "n" is corrupted.
The client supplied a replacement PC which is also an Intel
dual core and I have the same problem on the second PC.
(The tesing has been done on the second PC).
The processors on the 2 PC's are not the same. The first is
a 2.8 gig and the second (testing PC) is a 3.00 gig.
The programmes are running without issue on an AMD twin
processor so "twin" appears not to be the issue and they are
running on over 200 single processor systems.
Any help or advice would be greatly appreciated!
Roy
+++++++++++++++++++++++++++++++++
[for testing purposes amt$ is entered as "2"]
fail = 0: pnt = 0
for n = 1 to len(amt$)
[next line 1st]
if asc(mid$(amt$, n, 1)) > 47 and asc(mid$(amt$, n, 1)) < 58 then
'
elseif asc(mid$(amt$, n, 1)) = 46 then
pnt = pnt + 1
else
fail = 1
end if
[next line 2nd]
next n
if pnt > 1 then fail = 1
if fail = 1 then exit sub
cnvrat2:
if (left$(amt$, 1) <> "0" or amt$ = "0") then goto cnvrat3
amt$ = mid$(amt$, 2, len(amt$) - 1): goto cnvrat2
cnvrat3:
if len(amt$) > 9 then fail = 1: exit sub
amt# = val(amt$)
+++++++++++++++++++++++++++++++
------------------
has an Intel dual core processor.
One of the main progs is suffering an error #6 (Overflow) and
I have narrowed it down to the following SUB. For testing
purposes I have remmed out the CALL statement in the programme
and substituted the SUB's code inline.
The programme succesfully executes the code after "next line
1st" (ie it is a number) therefore passes to the line after
"next line 2nd".
Before executing "next n" I have printed "amt$" which is still
"2" but printing "n" causes an ERR #6 (n is an integer) and it
appears that the value "n" is corrupted.
The client supplied a replacement PC which is also an Intel
dual core and I have the same problem on the second PC.
(The tesing has been done on the second PC).
The processors on the 2 PC's are not the same. The first is
a 2.8 gig and the second (testing PC) is a 3.00 gig.
The programmes are running without issue on an AMD twin
processor so "twin" appears not to be the issue and they are
running on over 200 single processor systems.
Any help or advice would be greatly appreciated!
Roy
+++++++++++++++++++++++++++++++++
[for testing purposes amt$ is entered as "2"]
fail = 0: pnt = 0
for n = 1 to len(amt$)
[next line 1st]
if asc(mid$(amt$, n, 1)) > 47 and asc(mid$(amt$, n, 1)) < 58 then
'
elseif asc(mid$(amt$, n, 1)) = 46 then
pnt = pnt + 1
else
fail = 1
end if
[next line 2nd]
next n
if pnt > 1 then fail = 1
if fail = 1 then exit sub
cnvrat2:
if (left$(amt$, 1) <> "0" or amt$ = "0") then goto cnvrat3
amt$ = mid$(amt$, 2, len(amt$) - 1): goto cnvrat2
cnvrat3:
if len(amt$) > 9 then fail = 1: exit sub
amt# = val(amt$)
+++++++++++++++++++++++++++++++
------------------
Comment