Solved

# Hexidecimal Word Proccessor

Posted on 1997-11-28
162 Views
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
0
Question by:weinrj
• 3
• 2

LVL 2

Expert Comment

ID: 1216926

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

LVL 2

Expert Comment

ID: 1216927
That is only one way to do that... One of the fastest i know.
0

Author Comment

ID: 1216928
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

LVL 2

Accepted Solution

omsec earned 200 total points
ID: 1216929
Hexacedimal is a methamtic type. And 'HELLO' is a string. You cannot convert that "HELLO" in a number.
0

LVL 1

Expert Comment

ID: 1216930
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

Author Comment

ID: 1216931
what fuzzylogic said is what i want.
thanks

0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

### Suggested Solutions

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
: Microsoft Office Collaborate for free and online versions of Microsoft  Word, Excel, Powerpoint, OneNote, Onedrive , Email, Calendar etc. In short we can say that Microsoft office is a suite of servers, applications and services developed by  Micr…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…