summaryrefslogtreecommitdiff
path: root/stdlib/printf.ml
Commit message (Collapse)AuthorAgeFilesLines
* Stdlib: added Printf.ikbprintf, Printf.ibprintf (#9364)muskangarg212020-03-261-0/+2
|
* Remove the state argument in CamlinternalFormat.make_printf.Drup2018-08-021-4/+4
| | | | | This state argument was passed around, but never used, except by the continuation.
* Update headers for the new license.Damien Doligez2016-02-181-12/+14
| | | | Remains to be done: remove all headers in testsuite/tests.
* Use make_iprintf to build Printf.ikfprintf and Printf.ifprintf.Jeremy Yallop2015-10-271-1/+1
|
* Use a nominal datatype for CamlinternalFormat.format6Gabriel Scherer2014-05-141-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should make the type-checking of formats simpler and more robust: instead of trying to find a pair as previously, we can now use the path of the format6 type directly. A nice side-effect of the change is that the internal definition of formats (as a pair) is not printed in error messages anymore. Because format6 is in fact defined in the CamlinternalFormatBasics submodule of Pervasives, and has an alias at the toplevel of Pervasives, error messages still expand the definition: > Error: This expression has type > ('a, 'b, 'c, 'd, 'd, 'a) format6 = > ('a, 'b, 'c, 'd, 'd, 'a) CamlinternalFormatBasics.format6 > but an expression was expected of type ... Passing the option `-short-paths` does avoid this expansion and returns exactly the same error message as 4.01: > Error: This expression has type ('a, 'b, 'c, 'd, 'd, 'a) format6 > but an expression was expected of type ... (To get this error message without -short-paths, one would need to define format6 directly in Pervasives; but this type is mutually recursive with several GADT types that we don't want to add in the Pervasives namespace unqualified. This is why I'll keep the alias for now.) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14868 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* second part of Benoît Vaugon's format+gadts patchGabriel Scherer2014-05-121-725/+25
| | | | | | | | | | | | | | | | | | | | | | To finish the bootstrap cycle, run: make library-cross make promote make partialclean make core make library-cross make promote-cross make partialclean make ocamlc ocamllex ocamltools make library-cross make promote make partialclean make core make compare git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14810 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* merge branch "safe-string"Damien Doligez2014-04-291-6/+6
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14705 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR#5739: Printf.printf "%F" and nan/infinity/neg_infinity.Xavier Leroy2013-07-191-5/+11
| | | | | | | (Reflecting commit r13910 on version/4.01) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13911 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Wrong quoting chase.Pierre Weis2013-05-291-13/+18
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13717 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Details.Pierre Weis2013-04-251-1/+3
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13608 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Complete rewriting of Format.mk_printf. Convergence between Printf and ↵Pierre Weis2013-04-241-10/+16
| | | | | | Format codes. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13606 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Details.Pierre Weis2013-03-191-12/+12
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13413 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* fix a few problems with whitespace and over-long linesDamien Doligez2013-03-091-1/+2
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13393 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* remove all $Id keywordsDamien Doligez2012-10-151-2/+0
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Introducing ikfprintf.Pierre Weis2012-04-111-2/+14
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12343 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR#5380: copy fix from 3.12 branchDamien Doligez2012-01-111-5/+9
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12014 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* continuing to change the name to OCamlDamien Doligez2011-12-211-4/+4
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11922 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* renaming of Objective Caml to OCaml and cleanup of copyright headersDamien Doligez2011-07-271-1/+1
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* merge changes from 3.12.0 to 3.12.1Damien Doligez2011-07-201-4/+10
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11123 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Module Printf, Format, and Scanf are printed in -w A warning mode. This ↵Pierre Weis2011-06-201-6/+6
| | | | | | found an old and subtle bug in Format; for other modules, the code is clearer and cleaner! git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11100 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Documenting that +int is now a valid token, hence %F can support a sign ↵Pierre Weis2009-12-091-7/+1
| | | | | | indication. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9463 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* To deal with printf output for %F format, adding a unary + operator.Pierre Weis2009-12-071-2/+3
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9454 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Introducing nop format delimiter %,Pierre Weis2009-11-301-28/+4
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9429 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Spell-check.Pierre Weis2009-09-251-17/+17
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9355 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Correcting the F specification with/without widths.Pierre Weis2009-09-231-19/+56
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9345 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* merge changes from ocaml3110 to ocaml3111rc0Damien Doligez2009-05-201-3/+40
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9270 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* option -C is a gnuism that is not portable: use cd instead!Pierre Weis2009-04-061-4/+4
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9227 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* A simple fix to BR#4756Pierre Weis2009-03-281-17/+18
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9191 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Documentation.Pierre Weis2008-09-271-4/+9
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9040 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR#4321 bug with positional parametersDamien Doligez2008-09-101-1/+1
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9017 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Various explanations and typos.Pierre Weis2008-07-011-21/+27
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8901 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Support for tk8.5: correcting tk_incs.Pierre Weis2008-07-011-57/+109
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8899 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Indentation was erroneous.Pierre Weis2007-10-041-23/+23
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8410 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Encapsulation of system specific exports in module Printf.Pierre Weis2006-11-171-38/+76
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7735 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* New type ac (argument counting for format strings). New function ac_of_format.Pierre Weis2006-11-061-18/+17
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7722 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* New function ifprintf that does not print. (See request #0004031.)Pierre Weis2006-11-061-0/+2
| | | | | | | | | Ifprintf is a one-liner using implementation tools from Printf, whereas it is not possible to write it in pure Caml. Useful to conditionally ignore printing. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7717 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Better calculation of format argument number.Pierre Weis2006-10-271-13/+32
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7708 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Typechecking of user's defined readers.Pierre Weis2006-10-241-1/+1
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7705 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Sub module Sformat now deals with format6.Pierre Weis2006-10-241-5/+5
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7703 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Bug report 0004119: Issue with Scanf.Scanning.from_filePierre Weis2006-10-041-8/+11
| | | | | | | Bumping the version sub number and date. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7678 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Code review before adding new typing of format string.Pierre Weis2006-05-041-44/+49
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7396 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* fusion des changements 3.09.1 -> 3.09.2Damien Doligez2006-04-161-1/+1
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7382 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Dead code removed + typos.Pierre Weis2006-04-051-9/+4
| | | | | | | cvs: ---------------------------------------------------------------------- git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7375 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Module Sformat is internal to printf. Better typing specifications of ↵Pierre Weis2006-04-051-60/+89
| | | | | | functions working with format strings. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7374 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Importing the 3.09 debugging version of Printf.Pierre Weis2006-01-241-107/+133
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7333 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Correcting bug for %{ conversions.Pierre Weis2006-01-041-20/+33
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7300 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* nettoyageDamien Doligez2005-10-251-1/+1
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7164 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Hard bug in printf: when the first argument to print was a floating pointPierre Weis2005-09-301-11/+35
| | | | | | | number, the printing process failed and we had a fatal error. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7095 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Implementing positional parameters in format string. First step:Pierre Weis2005-09-261-45/+89
| | | | | | | | | runtime implementation for printf-like functions. Revising printf documentation and adding something for positional parameters. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7082 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Closing a long standing bug in the implementation of printf-likePierre Weis2005-09-201-177/+226
| | | | | | | | | | | | | functions: partially applied printf functions were printing material as soon as the first argument was applied (and even before: printing started as soon as the format string was provided). This is the first step towards the implementation of $ formats (i.e. formats that can access directly to any of their arguments, using a $n notation to denote the nth argument (``a la Yacc'')). This is supposed to be mandatory to internationalisation of messages. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7060 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02