Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Pattern match floats
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: George Russell <george.russell@c...>
Subject: [Caml-list] Pattern match floats
I am working through the OReilly book and have got as far as working on 
the little basic interpreter. I Am adding support for float type 
variables, and am trying to modify the lexer. 

I would like to be able to match ('0'..'9')*'.'('0'..'9')* i.e. one or 
more digits, a period, followed bt one or more digits.

I can't see how to do this in OCaml patter matching? Any ideas?

Thanks
George

-- 
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr