Browse thread
[Caml-list] This expression is not a function, it cannot be applied
- Johann Spies
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2001-09-09 (11:12) |
From: | Johann Spies <jhspies@a...> |
Subject: | [Caml-list] This expression is not a function, it cannot be applied |
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 = <fun> # let n jare = jare *. 12.0;; val n : float -> float = <fun> # let paaiement j n bedrag = (bedrag *. j /. (1.0 -. exp (-.n *. log (1.0 +. j))));; val paaiement : float -> float -> float -> float = <fun> # 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 = <fun> # 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