Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: conversion between hex and dec Message-ID: <7765@hoptoad.uucp> Date: 25 Jun 89 22:09:24 GMT References: <1300@osupyr.mps.ohio-state.edu> <354@mountn.dec.com> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 22 In article <354@mountn.dec.com> minow%thundr.dec@decwrl.dec.com (Martin Minow) writes: > >Paul Nevai asks for conversion routines between decimal and hex. Here's >a subroutine to convert from hex to ascii. Conversion from strings to >hex is about as simple. I appreciate your providing this subroutine to the net, but for the Mac, you should have stuck on a disclaimer warning about its non-international nature. Unfortunately, there's no international hexadecimal trap built in to the Mac, so developer utilities that need hex are intrinsically less internationalizable than most other software. The moral is to only use hex where you can't avoid it (e.g., ResEdit, Fedit). If you do have to use hex, it might be worth your while to put the hex routines in a separable code resource so people using some other languages won't have to recompile the whole thing. -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com Postal: 424 Tehama, SF CA 94103; Phone: (415) 495-2934 "Everything that gives us pleasure gives us pain to measure it by." -- The Residents, GOD IN THREE PERSONS