UNIX-WIZARDS Digest V3#065

black at ee.UCLA.EDU black at ee.UCLA.EDU
Wed Feb 18 10:46:39 AEST 1987


> ) sherm at elxsi.UUCP (Michael Sherman) writes
> ) [ ... ] Moral arguments aside, we're stuck with int==long.
> 
> This silly assumption is what makes it so hard to port code written
> on a vax or 68K to a 16-bit machine.

In Algol 68 there is a provision for infinite precision arithmetic
(theoretically anyway--I don't know if anyone ever implemented such
a compiler).  Each time one prepends the word "long" to a variable
declaration, the compiler doubles the number of bits reserved.  (Or 
perhaps adds a constant factor--I forget.)

This would be a real nice feature for C.  Of course, by use of
some tricky (machine-dependent) bit-fiddling, one can implement
64 bit long ints with two longs, but that flies in the face of
the whole Unix/C philosophy.  Remember this next time Santa
asks what you want for Christmas!

Rex Black
	
black at ee.ucla.edu                                          ARPA        
...!{ihnp4,ucbvax,sdcrdcf,trwspp}!ucla-cs!uclaee!black     UUCP

No age of reason
Is landing upon us--
This is the age
Of video violence.  --  Lou Reed



More information about the Comp.unix.wizards mailing list