On Wed, Nov 19, 2008 at 4:49 PM, Mark Volkmann
<[EMAIL PROTECTED]> wrote:
>
> On Wed, Nov 19, 2008 at 2:45 PM, prhlava <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hello again,
>>
>> Thank you all for the posts and explanations,
>>
>> After getting the clojure SVN version and few tweaks in the code, the
>> working result looks like:
>>
>>                     (with-open [ofile (new java.io.FileOutputStream
>>                                        (str result-directory
>>                                             "/"
>>                                             (make-filename x y))
>>                                        (boolean true))] ; I am appending only
>>                                (. ofile write
>>                              (into-array Byte/TYPE
>>                                          [(byte (bit-shift-right pix 16))
>>                                           (byte (bit-shift-right pix 8))
>>                                           (byte pix)])) ; the pix is of the 
>> Integer type
>
> It looks like with-open accepts any number of bindings. Does it just
> call close on the first one when the body finishes or on all of them?
>
> If I wanted to figure this out for myself, how would I find the source
> code for with-open?

Hi,

If you're using Slime in Emacs, type in the word "with-open" (or put
your cursor on it in a Clojure source file) and press M-. (alt-period
or Escape, period).

Best,
Graham

--~--~---------~--~----~------------~-------~--~----~
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
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to