Solved

Hexidecimal Word Proccessor

Posted on 1997-11-28
6
169 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
Let’s face it: one of the reasons your organization chose a SaaS solution (whether Microsoft Dynamics 365, Netsuite or SAP) is that it is subscription-based. The upkeep is done. Or so you think.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

707 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