guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie: lookup scm var from c by name


From: Mike Gran
Subject: Newbie: lookup scm var from c by name
Date: Mon, 5 May 2003 09:43:50 -0700 (GMT)

How do I get a scm var back into c?  In the code below,
I would have thought that scm_c_lookup should work.
Why does the second case work, but, not the first?


  scm_c_eval_string("(define a 10)");

  // Case 1
  s = scm_c_lookup ("a");
  if (SCM_INUMP (s))
      printf("Case 1: %d\n", SCM_INUM(s));

  // Case 2
  s = scm_c_eval_string("a");
  if (SCM_INUMP (s))
      printf("Case 2: %d\n", SCM_INUM(s));

Thanks for your patience.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]