You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 239 Reporter: administrator Status: closed (set by @xavierleroy on 2015-12-11T18:04:21Z) Resolution: won't fix Priority: low Severity: feature Category: ~DO NOT USE (was: OCaml general) Child of:#2559
Bug description
Hello,
this is a followup to #2559 (feature wish: "read_channel"). My code
example for "read_channel_aux" contains correct but redundant code and
should look as follows (whomever it may concern):
let rec read_channel_aux len lst buf_size ch =
let buf = String.create buf_size in
let n = input ch buf 0 buf_size in
if n <> 0 then read_channel_aux (len+n) ((buf,n)::lst) buf_size ch
else begin
let res = String.create len in
copy_lst res len lst;
res end
Original bug ID: 239
Reporter: administrator
Status: closed (set by @xavierleroy on 2015-12-11T18:04:21Z)
Resolution: won't fix
Priority: low
Severity: feature
Category: ~DO NOT USE (was: OCaml general)
Child of: #2559
Bug description
Hello,
this is a followup to #2559 (feature wish: "read_channel"). My code
example for "read_channel_aux" contains correct but redundant code and
should look as follows (whomever it may concern):
let rec read_channel_aux len lst buf_size ch =
let buf = String.create buf_size in
let n = input ch buf 0 buf_size in
if n <> 0 then read_channel_aux (len+n) ((buf,n)::lst) buf_size ch
else begin
let res = String.create len in
copy_lst res len lst;
res end
Sorry for my perfectionism ;)
Best regards,
Markus Mottl
--
Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl
The text was updated successfully, but these errors were encountered: