From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Simon Huskier Newsgroups: gmane.lisp.guile.user Subject: ERROR: Wrong number of arguments to # NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b15ab35e8407a04c497133b X-Trace: dough.gmane.org 1342053067 26924 80.91.229.3 (12 Jul 2012 00:31:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 12 Jul 2012 00:31:07 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Jul 12 02:31:07 2012 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Sp7JC-0000vk-U7 for guile-user@m.gmane.org; Thu, 12 Jul 2012 02:31:07 +0200 Original-Received: from localhost ([::1]:52654 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sp7JC-0000Jf-7J for guile-user@m.gmane.org; Wed, 11 Jul 2012 20:31:06 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39089) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sp7J7-0000Ja-Ue for guile-user@gnu.org; Wed, 11 Jul 2012 20:31:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sp7J6-0007CP-Tu for guile-user@gnu.org; Wed, 11 Jul 2012 20:31:01 -0400 Original-Received: from mail-pb0-f41.google.com ([209.85.160.41]:53889) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sp7J6-0007CL-NK for guile-user@gnu.org; Wed, 11 Jul 2012 20:31:00 -0400 Original-Received: by pbbrp2 with SMTP id rp2so3256843pbb.0 for ; Wed, 11 Jul 2012 17:31:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=XyqYL6M5PFIoH0j942QxygBQgZPkc0xx6bjz9alIHEU=; b=SKKQxJack8f3CCFpEepc80n8MbqoDgxothDyXEUFJzMO5AD2kqStcgrRB1eOFDw5EZ TZffAflFoMVroyHDUFs8VOKnJD8yMNCDAeeExMpGUvm+Lu8u1s3a7BG472303JcOKIxP 1fYNaKQh8bZaHT6JNvEEi7CiQO2vVArV0xIKDWfcvaKf+jk69watrpayhv+b0kbqt1+N 5rjfgYdnfPKb4hQbiqI4eez4VNovS1WEREtCvq7ATgcalZVqnOXbW8ckCPu6WmV8aOW9 XoJwNG5aaZo3LICukNmq/Qb55cd5GAFnbePFxFTDR20VLbvlzIRkobe2J3SZ/FGgC1Gk mJmw== Original-Received: by 10.68.193.226 with SMTP id hr2mr416124pbc.155.1342053059936; Wed, 11 Jul 2012 17:30:59 -0700 (PDT) Original-Received: by 10.143.146.16 with HTTP; Wed, 11 Jul 2012 17:30:39 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.41 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:9525 Archived-At: --047d7b15ab35e8407a04c497133b Content-Type: text/plain; charset=ISO-8859-1 Dear Scheme users: When I run the following piece of code, I encountered an error: *ERROR: Wrong number of arguments to #cartesian (x)> * ;;;; function definition > (define (eps-func p) > (let* ((p (lattice->cartesian)) > (x (vector3-x p)) > (y (vector3-y p)) > (z (vector3-z p))) > (if (> sin(* 2 pi x y z) 0) > (make dielectric > (epsilon 12)) > (make dielectric > (epsilon 1))))) > ;;;; function call > (set! default-material (make material-function (material-func eps-func))) I cannot figure out where it is wrong. The above code is only part of a control file. Some background information is as following: (lattice->cartesian x) where x is a vector3 vector3 is a datatype defined somewhere 3-vector functions (vector3 x [y z]) Create a new 3-vector with the given components. If the y or z value is omitted, it is set to zero. (vector3-x v) (vector3-y v) (vector3-z v) Return the corresponding component of the vector v. material-func [function] A function of one argument, the position vector3 Thanks in advance. Regards, Simon --047d7b15ab35e8407a04c497133b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Dear Scheme users:

When I run the following piece of code, I encountered an erro= r:
=A0 =A0=A0ERROR: Wrong number of arguments to #<procedur= e lattice->cartesian (x)>

;;;; function definition
(define (eps-func p)
=A0 =A0(let* ((p (latti= ce->cartesian))
=A0 =A0 =A0 =A0 =A0 =A0 =A0(x (vector3-x p))
=A0 = =A0 =A0 =A0 =A0 =A0 =A0(y (vector3-y p))
=A0 =A0 =A0 =A0 =A0 =A0 =A0(z (= vector3-z p)))
(if (> = sin(* 2 pi x y z) 0)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (make dielectric
=A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 (epsilon 12))
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (= make dielectric
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (epsilon= 1)))))
;;;; function call
(set! default-material (make material-func= tion (material-func eps-func)))

I cannot figure out where it is wrong. The above code i= s only part of a control file.=A0

Some background = information is as following:

(lattice->cartesia= n x)
where x is a vector3

vector3 is a datatype de= fined somewhere

3-vector functions
(vect= or3 x [y z])
=A0 =A0 Create a new 3-vector with the given compone= nts. If the y or z value is omitted, it is set to zero.
(vector3-x v)
(vector3-y v)
(vector3-z v)
Return the corresponding component of the vector v.

<= div>material-func [function]
A function of one argument, the posi= tion vector3

Thanks in advance.

Regards,

Simon
--047d7b15ab35e8407a04c497133b--