caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] This expression is not a function, it cannot be applied
@ 2001-09-09 11:11 Johann Spies
  2001-09-09 11:25 ` Remi VANICAT
  2001-09-09 11:38 ` Mike Leary
  0 siblings, 2 replies; 4+ messages in thread
From: Johann Spies @ 2001-09-09 11:11 UTC (permalink / raw)
  To: ocaml

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-09-10  9:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-09 11:11 [Caml-list] This expression is not a function, it cannot be applied Johann Spies
2001-09-09 11:25 ` Remi VANICAT
2001-09-09 11:38 ` Mike Leary
2001-09-10  9:39   ` Johann Spies

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).