14 Nov
2013
14 Nov
'13
17:06
On Nov 14, 2013, at 4:23 PM, Francois Magnan <magnan@categoricaldesign.com> wrote:
By the way ##inline-host-code doesn’t seem to work anymore.
(define (console.log x) ;; Note: the parameter x will be in variable Gambit_r1 (##inline-host-code “console.log(Gambit_r1);\n”))
How can I inline javascript code now? Thank you, Francois
Recall that ##inline-host-code no longer exists... you have to use ##inline-host-statement and ##inline-host-expression depending on the nature of the code. For example, this works for me using node: (declare (extended-bindings) (not safe)) (define (show arg) (##inline-host-statement "console.log(Gambit_r1.toString());")) (show 'hello) (show "world") (show (##inline-host-expression "1+2+3")) Marc