forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


-32767 is non-numeric value ?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
gonzabar
Newbie


Joined: 24 Jun 2001
Posts: 15
Location: Madrid, Spain

PostPosted: Fri Nov 22, 2002 12:53 pm    Post subject: -32767 is non-numeric value ? Reply with quote

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
View user's profile Send private message Send e-mail
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Fri Nov 22, 2002 12:59 pm    Post subject: Reply with quote

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 Smile

_________________
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
View user's profile Send private message Send e-mail
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Fri Nov 22, 2002 1:21 pm    Post subject: Reply with quote

Strange, it works OK with floating point math functions,
but not with @sum(), @diff(), or @prod()... Confused

Also, @numeric() isn't a problem...
Code:

if @numeric(-32767)
   %n = @fadd(-32767, 1)
   INFO It's numeric! %n
end

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group