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

Integer Shift Function(s)

    Date: Wed 16 Apr 86 15:42:31-PST
    From: David Singer <DSinger@SRI-KL>

    I was translating an Interlisp program into Common Lisp and found that
    Common Lisp has only arithmetic shift (ash, page 224), and unlike many
    systems which have shift functions, no logical shift.  Is this an
    oversight, or a deliberate omission?  Certainly it's possible to make
    an lsh function, but taking care of word length etc. is painful and it
    would (probably) not be as fast as a 'built-in'.  (I note that the
    Symbolics Common Lisp system and Lucid on Sun both provide lsh, but
    Kyoto on Sun do not ... these are all the Common Lisp systems I have access

    Sorry if this question has previously been raised and answered, or if I
    have missed something.
	Dave Singer (dsinger@sri-kl)

This was deliberate omission, for essentially the reasons you cite of
pain and portability.  Note that LDB can handle many of the purposes
of LSH.