From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id XAA10475; Wed, 25 Jul 2001 23:25:27 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id XAA10470 for caml-list@pauillac.inria.fr; Wed, 25 Jul 2001 23:25:26 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA20710 for ; Tue, 24 Jul 2001 23:44:16 +0200 (MET DST) Received: from mail.noos.fr (aragon.noos.net [212.198.2.75]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f6OLiFn16340 for ; Tue, 24 Jul 2001 23:44:15 +0200 (MET DST) Received: (qmail 32725261 invoked by uid 0); 24 Jul 2001 21:44:15 -0000 Received: from unknown (HELO corwin.ambre.net) ([212.198.162.84]) (envelope-sender ) by 212.198.2.75 (qmail-ldap-1.03) with SMTP for ; 24 Jul 2001 21:44:15 -0000 Received: by corwin.ambre.net (Postfix, from userid 1000) id 6AD8115903C; Tue, 24 Jul 2001 23:44:13 +0200 (CEST) To: Sudhapaturi@aol.com Cc: caml-list@inria.fr, supraja_a@hotmail.com Subject: Re: [Caml-list] Re:code References: <20.19ae05a5.288ead36@aol.com> X-face: '|!UPdE>Ot'L}nt?6Tf|'s{y%l~,+Yc5|p8A}ibew|_!vc48pPNPPx@7QA~$`$g=|yH*8sh9R]Xj1(CV7oUe>#/,t.(Z4F From: Dimitri Ara Date: 24 Jul 2001 23:44:13 +0200 In-Reply-To: Sudhapaturi@aol.com's message of "Tue, 24 Jul 2001 06:51:34 EDT" Message-ID: <87ae1uypci.fsf@corwin.ambre.net> User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Sudhapaturi@aol.com a écrit : > I am very new in this. I wanted to write a code to get a match for the > following. > If a word is given it should search where the vowels are ? > for example a word like structure . > Can you please tell me How I can do that? I'm not sure i understood what you want. Here is a function vowels_pos such as (vowels_pos s) is a list of position of vowels in the word s. let vowels_pos s = let pos = ref [] in for i = 0 to String.length s - 1 do match s.[i] with | 'a' | 'e' | 'i' | 'o' | 'u' -> pos := i :: !pos | _ -> () done ; !pos -- > Notre devoir, pour leur bien et pour le bien de Linux, est de te > flinguer avant que tu ne les sacrifies (fût-ce avec les meilleures > intentions du monde). -+- TP In: Guide du linuxien pervers : "De la pédagogie par l'Exemple" ------------------- 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