Solved

Hexidecimal Word Proccessor

Posted on 1997-11-28
6
159 Views
Last Modified: 2010-04-16
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
Comment
Question by:weinrj
  • 3
  • 2
6 Comments
 
LVL 2

Expert Comment

by:omsec
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

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

Author Comment

by:weinrj
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 2

Accepted Solution

by:
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

by:FuzzyLogic
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

by:weinrj
ID: 1216931
what fuzzylogic said is what i want.
please help me on this.
thanks


0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Are you unable to connect or configure Hotmail email account in Microsoft Outlook 2010, 2007? Or Outlook.com emails are not downloading to Outlook? Lets’ see the problem and resolve Outlook Connector error syncing folder hierarchy (0x8004102A).
We have come a long way with backup and data protection — from backing up to floppies, external drives, CDs, Blu-ray, flash drives, SSD drives, and now to the cloud.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now