caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Marcin 'Qrczak' Kowalczyk" <qrczak@knm.org.pl>
To: caml-list@inria.fr
Subject: Re: [Caml-list] open_file
Date: Wed, 26 Jan 2005 11:16:56 +0100	[thread overview]
Message-ID: <874qh47aw7.fsf@qrnik.zagroda> (raw)
In-Reply-To: <41F6CE0A.1010301@1969.ws> (Karl Zilles's message of "Tue, 25 Jan 2005 14:54:02 -0800")

Karl Zilles <zilles@1969.ws> writes:

> let buff = "empty";;
>
>> let main () =
>>   let file_content = read file_reader !buff 1 5 in
>
> let file_content = read file_reader buff 0 5 in

You should not modify string literals, because they are allocated
statically. Use String.create to make a fresh string.

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak@knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/


  reply	other threads:[~2005-01-26 10:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-25 22:19 open_file yjc01
2005-01-25 22:43 ` [Caml-list] open_file Karl Zilles
2005-01-25 22:58   ` Oliver Bandel
2005-01-26 14:41   ` [Caml-list] read file Yan Jun Daisy Chen
2005-01-26 15:50     ` Oliver Bandel
2005-01-25 22:54 ` [Caml-list] open_file Karl Zilles
2005-01-26 10:16   ` Marcin 'Qrczak' Kowalczyk [this message]
2005-01-25 22:54 ` Oliver Bandel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874qh47aw7.fsf@qrnik.zagroda \
    --to=qrczak@knm.org.pl \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).