[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cross-platform programming question...



In <KRHmb.34474$Rd4.15280@fed1read07> Scott Alfter wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> In article <bnesff$b90$1@acme.gcfn.org>,
> Dave Althoff Jr <dalloff@gcfn.org> wrote:
>>Just a simple one...
>>
>>When we refer to a hexadecimal number, we designate it like this:
>>
>>$FB6F
>>
>>When anybody else does it, they do it like this:
>>
>>0xFB6F
> 
> That's C notation, which started on UN*X and spread elsewhere from 
> there... anybody who's written stuff in C or C++ will be familiar with 
> that.  The TI-99/4(A) folks have yet another notation they use...">" 
> instead of "$" or "0x", IIRC.  I wouldn't be surprised if there are 
> other forms used by Atari, Commodore, and other 8-bit machines.

Some other systems used the dollar sign, probably copied from Apple or 
from the same source Apple adopted their convention from. IIRC, BBC 
Micro and MS QBasic use an ampersand prefix for hexadecimal e.g. &FB6F.

The 0x notation always seems wasteful to me since it requires TWO 
characters to convey one bit of information. It would make sense if used 
for other number bases though e.g. Bx10001001, Ox25, HxFB6F, Dx65535.

-- 
Roger Johnstone, Invercargill, New Zealand

PS/2 Mouse Adapter for vintage Apple II or Mac
order at http://vintageware.orcon.net.nz