package batteries
A community-maintained standard library extension
Install
Dune Dependency
Authors
Maintainers
Sources
v3.7.2.tar.gz
md5=1fd7bddce07cf5d244fc9427f7b5e4d4
sha512=c0f2a0fdc8253e0ea999d8d4c58bfbf32b18d251a2e1d9656bf279de5f01a33e9aabac3af4d95f465f8b671e7711ebd37218043face233340a0c11b08fa62f78
doc/src/batteries.unthreaded/batScanf.ml.html
Source file batScanf.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
(* * BatScanf - Extended Scanf module * Copyright (C) 2009 David Rajchenbach-Teller, LIFO, Universite d'Orleans * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version, * with the special exception on linking described in file LICENSE. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *) module Scanning = struct include Scanf.Scanning let from_input inp = from_function (fun () -> try BatInnerIO.read inp with BatInnerIO.No_more_input -> raise End_of_file) (*$T bscanf (Scanning.from_input (BatIO.input_string "12 bc" )) "%d %s" (fun d s -> d = 12 && s = "bc") *) let from_channel = from_input let stdib = from_input (BatInnerIO.stdin) end type ('a, 'b, 'c, 'd) scanner = ('a, Scanning.scanbuf, 'b, 'c, 'a -> 'd, 'd) format6 -> 'c open Scanf ##V<5##let fscanf = fscanf let sscanf = sscanf let scanf = scanf let kscanf = kscanf let bscanf = bscanf let bscanf_format = bscanf_format let sscanf_format = sscanf_format let format_from_string = format_from_string exception Scan_failure = Scan_failure
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>