| View previous topic :: View next topic |
| Author |
Message |
dmonckton Contributor


Joined: 09 Aug 2002 Posts: 117 Location: Lewes, U.K.
|
Posted: Fri May 08, 2009 10:48 am Post subject: @lib() Function Help |
|
|
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 |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Mon May 11, 2009 7:41 pm Post subject: |
|
|
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 |
|
 |
dmonckton Contributor


Joined: 09 Aug 2002 Posts: 117 Location: Lewes, U.K.
|
Posted: Tue May 12, 2009 8:42 am Post subject: |
|
|
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 |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Tue May 12, 2009 1:33 pm Post subject: |
|
|
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 |
|
 |
|