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 


@lib() Function Help

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


Joined: 09 Aug 2002
Posts: 117
Location: Lewes, U.K.

PostPosted: Fri May 08, 2009 10:48 am    Post subject: @lib() Function Help Reply with quote

Hi

I'm a bit p****d o*f with the help file for @lib() function. It does not say you can pass hex numbers straight to the function by prefixing them with a "$", I've been converting all mine to decimal by hand!! Can anyone PLEASE give me(us) some more detailed help on using the @lib() function.

Thanks

David...
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Mon May 11, 2009 7:41 pm    Post subject: Reply with quote

By default all VDS commands and functions will do that. VDS converts hex values that have the '$' infront of them before sending the value to the actuall function or command being called. If I am not mistaken the '$' is what Delphi uses to denote a Hex number. My guess is that VDS inherited this from Delphi since VDS was written in Delphi by a Delphi programmer. This has always been in VDS but never documented. Another issue is the @HEX() function which converts a decimal number to HEX but it does not prepend the '$' so some functions that need the '$' will fail.
_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
dmonckton
Contributor
Contributor


Joined: 09 Aug 2002
Posts: 117
Location: Lewes, U.K.

PostPosted: Tue May 12, 2009 8:42 am    Post subject: Reply with quote

Well you learn something everyday! I've been using VDS since version 1997 and had no idea you could use HEX numbers in functions! I tried this to confirm things...
Code:

%x = $80
%y = $1
%a = @sum(%x,%y)
info %a
info @hex(%a)
exit


I'm writing a project that uses the Win32 Multi Media API and being able to use HEX in the function calls will make this alot easier!

Just being silly but can you use OCTAL numbers aswell?

Thanks for the advice I will be using it from today!

David.
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Tue May 12, 2009 1:33 pm    Post subject: Reply with quote

Hmmm I have never tried octal. Does anyone know the symbol (if any) that Delphi uses to denote an octal value?

Anyway if you get stuck I do have code that can convert from any base to any base up to base 36 if you need it.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
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