Hexidecimal Word Proccessor

I would like to make a pascal program that will allow me
to type in phrases, sentences, etc, and it will display
its appropiate ASCII converted Hexidecimal output.
I would like this to work if i type in hexideciaml, for the
ascii output as well.  thanks
weinrjAsked:
Who is Participating?
 
omsecConnect With a Mentor Commented:
Hexacedimal is a methamtic type. And 'HELLO' is a string. You cannot convert that "HELLO" in a number.
0
 
omsecCommented:

Hi ! To convert decimal numbers to hexadecimal strings isn't hard ! Check out the source procedure i wrote below. You may convert with it decimal numbers to any other mathematical systems like Hexadecimal, Binary or Octal etc.

Function DezConvert(Zahl : LongInt; Basis : Byte) : String;

Const
  HexStr      : String[16] = '0123456789ABCDEF';

Var
  HlpStr      : String;

Begin
   If Zahl = 0 Then
     HlpStr := '0'
   Else
     HlpStr := '';
   While Zahl <> 0 do
     Begin
       HlpStr := HexStr[(Zahl mod Basis) + 1] + HlpStr;
       Zahl   := Zahl div Basis;
     End;
   DezConvert := HlpStr;
End;

ZAHL is the number you wanna convert.
BASIS is the system's basis

to hex : BASIS is 16
to bin : BASIS is  2
to oct : BASIS is  8

Greets, Omsec
0
 
omsecCommented:
That is only one way to do that... One of the fastest i know.
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
weinrjAuthor Commented:
thanks.  I figured what Zahl was since i know some german.
thank you for your help.  but would this work for

"Hello" into hexidecimal conversions?

thanks
0
 
FuzzyLogicCommented:
I think what weinrj wants is to convert the string "HELLO" into hexadeciaml form char by char. That means "48454C4C4F".
If this is what you want, you can easily modify omsec function to do that.

FuzzyLogic
0
 
weinrjAuthor Commented:
what fuzzylogic said is what i want.
please help me on this.
thanks


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.