caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Johann Spies <jhspies@adept.co.za>
To: ocaml <caml-list@inria.fr>
Subject: [Caml-list] This expression is not a function, it cannot be applied
Date: 09 Sep 2001 13:11:03 +0200	[thread overview]
Message-ID: <871ylgk4ag.fsf@adept.co.za> (raw)

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


             reply	other threads:[~2001-09-09 11:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-09 11:11 Johann Spies [this message]
2001-09-09 11:25 ` Remi VANICAT
2001-09-09 11:38 ` Mike Leary
2001-09-10  9:39   ` Johann Spies

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871ylgk4ag.fsf@adept.co.za \
    --to=jhspies@adept.co.za \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).