1.

Solve : convert decimal to hexa?

Answer»

Hello everybody

I have got problem with converting decimal number to hexa.

I need to convert some entered number in batch file and print it's hexa value without some SHELL in MSDOS.

For EXAMPLE, I enter number 10 via command set /P Par1=Enter decimal number:
and i need to print via echo command its hexa value 0A and SAVE this value to enviromnent variable.
Is possible something such to make in MSDOS? I found nothing in MSDOS.

My second way:
Then I tried to create the small program in C which convert decimal value to hexa. The decimal value is input parameter of this program and returned value is hexa value (char *).

I know that I can find out this returned value from env variable %ERRORLEVEL% ,but i need to return string value (with integer returned value - no problem). When I return hexa value, %ERRORLEVEL% contain some number maybe pointer adrress.

Can somebody help me to resolve this problem. I can not use some shell.

Thanks










Discussion

No Comment Found