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 HAA25276; Fri, 7 May 2004 07:54:09 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id HAA25772 for ; Fri, 7 May 2004 07:54:08 +0200 (MET DST) From: briand@aracnet.com Received: from obsidian.spiritone.com (obsidian.spiritone.com [216.99.193.137]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i475s7SH029595 for ; Fri, 7 May 2004 07:54:07 +0200 Received: from soggy.deldotd.com (216-99-206-32.cust.aracnet.com [216.99.206.32]) by obsidian.spiritone.com (8.12.10/8.12.8) with ESMTP id i475s6C9005690 for ; Thu, 6 May 2004 22:54:06 -0700 Received: from briand by soggy.deldotd.com with local (Exim 3.36 #1 (Debian)) id 1BLyJC-00049r-00 for ; Thu, 06 May 2004 22:54:06 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16539.9342.181580.299374@soggy.deldotd.com> Date: Thu, 6 May 2004 22:54:06 -0700 To: caml-list@inria.fr Subject: [Caml-list] function application is partial In-Reply-To: <16539.7381.795851.523672@soggy.deldotd.com> References: <16539.7381.795851.523672@soggy.deldotd.com> X-Mailer: VM 6.92 under Emacs 21.2.1 X-Miltered: at concorde with ID 409B247F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 printf:01 printf:01 deg:99 bug:01 faq:01 faq:01 beginner's:01 beginners:01 bin:01 caml-bugs:01 ocaml:01 caml:01 caml:01 groups:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk There's nothing like posting and finding your mistake an instant later. The printf was causing the error. But why was the error on p=v.(i) and not on the printf line itself ? Thanks Brian >>>>> "briand" == briand writes: briand> File "sweep.ml", line 30, characters 6-115: briand> Warning: this function application is partial, briand> maybe some arguments are missing. briand> Here's the source: briand> type sweep_data = { freq: float; data: Complex.t };; briand> let print_sweep (v: sweep_data array) = briand> let n = Array.length v in briand> (* print out the magnitude data in dB *) briand> for i = 0 to n-1 do briand> let p = v.(i) in briand> let f = p.freq in briand> let z = p.data in briand> Printf.printf "%.3e %.3e\n" (number_db (Complex.norm2 z)); briand> done; briand> print_newline(); briand> (* print the phase data *) briand> for i = 0 to n-1 do briand> let p = v.(i) in briand> let f = p.freq in briand> let z = p.data in briand> Printf.printf "%.3e %.3e\n" (rad_deg (Complex.arg z)); briand> done; briand> ;; briand> Array.get can only take two arguments (duh). briand> If it is getting two arguments how can it possibly be interpreted as a briand> partial application ? briand> Brian briand> ------------------- briand> To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr briand> Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ briand> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners