convert a decimal number

HMG en Español

Moderator: Rathinagiri

Post Reply
User avatar
jairpinho
Posts: 420
Joined: Mon Jul 18, 2011 5:36 pm
Location: Rio Grande do Sul - Brasil
Contact:

convert a decimal number

Post by jairpinho »

Staff need to convert a decimal number to hexadecimal, binary, bit, byte someone could help me with some example.

thank you
Jair Pinho
HMG ALTA REVOLUÇÃO xBASE
HMG xBASE REVOLUTION HIGH
http://www.hmgforum.com.br
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: convert a decimal number

Post by Rathinagiri »

Hi,

I think you can use these Harbour Functions:

BINTODEC(<cString>) --><cNr>
OCTALTODEC(<cString>) --><cNr>
HEXATODEC(<cString>) -><cNr>
DECTOBIN(<cString>) --><cNr>
DECTOOCTAL(<cString>) --><cNr>
DECTOHEXA(<cString>) --><cNr>
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
jairpinho
Posts: 420
Joined: Mon Jul 18, 2011 5:36 pm
Location: Rio Grande do Sul - Brasil
Contact:

Re: convert a decimal number

Post by jairpinho »

thank you rathi
Jair Pinho
HMG ALTA REVOLUÇÃO xBASE
HMG xBASE REVOLUTION HIGH
http://www.hmgforum.com.br
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: convert a decimal number

Post by esgici »

Or NTOC() / CTON() function may be useful.

Regards

--

Esgici
NToC&CToN.zip
Descriptions on NToC and CToN fucntions
(1.39 KiB) Downloaded 318 times
Viva INTERNATIONAL HMG :D
User avatar
jairpinho
Posts: 420
Joined: Mon Jul 18, 2011 5:36 pm
Location: Rio Grande do Sul - Brasil
Contact:

Re: convert a decimal number

Post by jairpinho »

thank you Esgici
Jair Pinho
HMG ALTA REVOLUÇÃO xBASE
HMG xBASE REVOLUTION HIGH
http://www.hmgforum.com.br
Post Reply