Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Using Scheme in ASP (See related posts)

;The following example is in VBScript. Any scripting language that uses com objects will be similar
;1 Install PLT Scheme - it will register the dlls
;2 Control Panel > Administrative Tools > Component Services
; My Computer > DCOM Config > MzCOM
; Properties > Security > Launch and Activation Permissions > Customize
; Add Everyone or IUSR_<Computername> Allow Local Launch, Local Activation

;Output
;(define test (lambda () (+ 1 2 3 4 5)))
;15
strScheme = "(define test (lambda () (+ 1 2 3 4 5)))" 'Test Function
    
Set objScheme = Server.CreateObject("MzCOM.MzObj")   
result = objScheme.Eval(strScheme) 
result = objScheme.Eval("(test)")  'It remembers the function
Set objScheme = Nothing

Response.Write(strScheme & "<br>" & result & "<br>") 'Display Results

You need to create an account or log in to post comments to this site.


Click here to browse all 4858 code snippets

Related Posts