View previous topic :: View next topic |
Author |
Message |
gonzabar Newbie
Joined: 24 Jun 2001 Posts: 15 Location: Madrid, Spain
|
Posted: Fri Nov 22, 2002 12:53 pm Post subject: -32767 is non-numeric value ? |
|
|
TITLE non-numeric?
%A = -32767
if @not(@numeric(%A))
info %A is non-numeric value
end
%C = @sum(%A,256)
INFO %C
exit
The last program ends with runtime error
If %A = -32768 or %A = -32766 or another integer value, result is ok
Is a bug ? |
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Fri Nov 22, 2002 12:59 pm Post subject: |
|
|
Sure looks like a bug...
It does the same thing on my system (VDS3).
-32767 causes an error in math functions, but one
more or one less doesn't...
__________________________________________________________________________________________________________________________
Code: |
%n = @sum(-32766, 1)
INFO test1 %n
rem -- This one will RETURN the -32767 value OK --
%n = @sum(-32768, 1)
INFO test2 %n
rem -- Only this one causes an error --
%n = @sum(-32767, 1)
INFO test3 %n
|
Cheers, Mac _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
|
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Fri Nov 22, 2002 1:21 pm Post subject: |
|
|
Strange, it works OK with floating point math functions,
but not with @sum(), @diff(), or @prod()...
Also, @numeric() isn't a problem...
Code: |
if @numeric(-32767)
%n = @fadd(-32767, 1)
INFO It's numeric! %n
end
|
Cheers, Mac _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|