Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] Pattern matching and strings
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-10-04 (12:10)
From: Remi VANICAT <vanicat@l...>
Subject: Re: [Caml-list] Pattern matching and strings (and a mini-bug in Scanf)
Alessandro Baretta <> writes:

> Pierre Weis wrote:
>> [...]
>> I should say that I am reluctant to had a special typing rule for the
>> new specifier you proposed, when "%[\000-\255]" does perfectly the job
>> and does not require any addition to the type-checker nor to the
>> implementation of Scanf.
>> Pierre Weis
> Why do you mention the type checker? Is each conversion specifier a
> special case for the type checker?

Of course it is :

# Scanf.scanf "%s %d %i";;
- : (string -> int -> int -> '_a) -> '_a = <fun>

to type this, the type checker have to look inside the format and find
that %s look for a string, %d and %i an int.

Rémi Vanicat
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: