2009/11/19 MarkSwanson <mark.swanson...@gmail.com>:
> I'm porting some Java code that uses >>>.
> Is there a way to do this in Clojure?
>
> FYI: http://java.sun.com/docs/books/tutorial/java/nutsandbolts/opsummary.html

I'm sure someone else will have a proper answer, but you could just
create a class with a static unsignedRightShift method in Java and
then:

user=> (defn >>> [#^Integer val #^Integer shift]
(Shift/unsignedRightShift val shift))
#'user/>>>
user=> (>>> 99 2)
24

Although you might want to call it unsigned-bit-shift-right instead
for consistency with bit-shift-right.

-- 
Michael Wood <esiot...@gmail.com>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to