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 NAA22701; Sun, 9 Sep 2001 13:12:15 +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 NAA22647 for ; Sun, 9 Sep 2001 13:12:13 +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 f89BC9v13698 for ; Sun, 9 Sep 2001 13:12:11 +0200 (MET DST) Received: from spyker (p22.dialup-01.adept.za.net [64.245.12.22]) by stb-mail-01.adept.za.net (Postfix) with ESMTP id E59B42002D for ; Sun, 9 Sep 2001 13:12:00 +0200 (SAST) Received: from js by spyker with local (Exim 3.12 #1 (Debian)) id 15g2UT-0002VH-00 for ; Sun, 09 Sep 2001 13:11:05 +0200 To: ocaml Subject: [Caml-list] This expression is not a function, it cannot be applied From: Johann Spies Date: 09 Sep 2001 13:11:03 +0200 Message-ID: <871ylgk4ag.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 Hello, I can not see what is wrong in the following code. Why do I get the following error: ------------------------------------ # let j koers = koers /. 100.0/. 12.0;; val j : float -> float = # let n jare = jare *. 12.0;; val n : float -> float = # let paaiement j n bedrag = (bedrag *. j /. (1.0 -. exp (-.n *. log (1.0 +. j))));; val paaiement : float -> float -> float -> float = # let druk_ry m h r a = Printf.printf " %02f\t%04.02f\t%04.02f\t%04.02f\n" (m h r a);; val druk_ry : ('a -> 'b -> 'c -> float) -> 'a -> 'b -> 'c -> float -> float -> float -> unit = # let rec druk_tabel hoofsom pmnt j n maand = match (maand, hoofsom) with (n, 0.) -> () |(0., _) -> print_string "ongeldige tydperk\n"; print_newline() | (_, _) -> if maand == 1. then Printf.printf "Maand\tBedrag\tRente\tAfbetaal"; let rente = hoofsom *. j in let afbetaal = pmnt -. rente in let nuwe_hoofsom = hoofsom -. afbetaal in druk_ry (maand hoofsom rente afbetaal); druk_tabel nuwe_hoofsom pmnt j n maand+1;; Characters 424-429: This expression is not a function, it cannot be applied ---------------------------- The culprit is "maand " in the second last row (druk_ry (maand...)) Why can it not be applied? Johann -- J.H. Spies - Tel. 082 782 0336 / 021-808 4036(w) Posbus 4668, Tygervallei 7536 "Submit yourselves therefore to God. Resist the devil, and he will flee from you." James 4:7 ------------------- 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