This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

passing integers to c functions



If I have a c function,

SCM 
foo (SCM x)
{
  SCM_ASSERT (SCM_INUMP (x), x,  SCM_ARG1, "foo");
  [ real code ... ]
}

And then I want to pass it an integer (possibly from a non integer
value), I would think that I should be able to do something like:

(foo (round x))

But instead I get "Wrong type argument in position 1: 10.0" (where x = 
10.0).  So how do I do this conversion?  Thanks in advance!

-- 
James Dean Palmer                            Graduate Student
james@tiger-marmalade.com                    Visualization Sciences Program
http://www.tiger-marmalade.com/~james/       Texas A&M University