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 VAA04148; Mon, 25 Jun 2001 21:51:31 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 VAA03940 for ; Mon, 25 Jun 2001 21:51:30 +0200 (MET DST) Received: from stb-mail-01.adept.za.net (stb-mail-01.adept.za.net [64.245.11.2]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f5PJpQT00480 for ; Mon, 25 Jun 2001 21:51:28 +0200 (MET DST) Received: from spyker (p5.dialup-01.adept.za.net [64.245.12.5]) by stb-mail-01.adept.za.net (Postfix) with ESMTP id C16791FF16 for ; Mon, 25 Jun 2001 21:51:22 +0200 (SAST) Received: from js by spyker with local (Exim 3.12 #1 (Debian)) id 15EcOG-0000TU-00 for ; Mon, 25 Jun 2001 21:51:20 +0200 To: caml-list@inria.fr Subject: [Caml-list] Newbie question about type (and syntax?) From: Johann Spies Date: 25 Jun 2001 21:51:19 +0200 Message-ID: <8766dk72yw.fsf@adept.co.za> User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I am working through a tutorial and typing in the following example produced an error: ------------------------------- let rec power i x = if i = 0 then 1 else x *. (power (i-1) x);; This expression has type float but is here used with type int ------------------------------------------------------- I can not see why it is an error and how to correct the code coming from the tutorial. Can somebody help me please? Johann -- J.H. Spies - Tel. 082 782 0336. Posbus 4668, Tygervallei 7536 "Honour thy father and mother; which is the first commandment with promise; That it may be well with thee, and thou mayest live long on the earth." Ephesians 6:2,3 ------------------- 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