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 


Int8 to int16?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1711
Location: Space and Time

PostPosted: Mon Jun 12, 2017 9:44 pm    Post subject: Int8 to int16? Reply with quote

I am trying to take two 0-255 numbers to create the single -32768 to +32767 number. Anyone able to lend a hand?
_________________
Chris
Http://vdsfreak.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Hooligan
VDS Developer
VDS Developer


Joined: 28 Oct 2003
Posts: 477
Location: California

PostPosted: Fri Jun 30, 2017 4:18 pm    Post subject: Reply with quote

Are you looking for something like this?

Code:
%a = @input("1st number",255)
  %b = @input("2nd number",255)
  %h = @hex(%a,2)@hex(%b,2)
  info %a" + "%b@cr()%h
  %n = @sum($%h)
  info %n
  exit

_________________
Hooligan

Why be normal?
Back to top
View user's profile Send private message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1711
Location: Space and Time

PostPosted: Sun Jul 02, 2017 5:34 pm    Post subject: Reply with quote

Thanks!
_________________
Chris
Http://vdsfreak.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help 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