You are not logged in.

Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

jbExplorer

Trainee

  • "jbExplorer" started this thread

Posts: 111

Date of registration: Mar 18th 2013

  • Send private message

1

Saturday, March 22nd 2014, 3:20am

Evaluating Clojure expressions from Jabaco

'// Pull clojure-1.6.0-RC1.jar (or preferred Clojure jar) into the classpath, from
'// http://search.maven.org/#search%7Cga%7C1…ND%20v%3A1.6.0*
'// or
'// http://clojure.org/downloads


' Import clojure#core
Import clojure#lang#RT
' Import clojure#lang#IFn

'Import clojure#lang#Symbol
'Import clojure#lang#Var

Public Sub main(ByJava args() As String)
Dim myArgs() As String
myArgs = args

Dim sClojureExpression As String
Dim xResult As Variant
Dim nResult As Integer

sClojureExpression = "( + 3 2 )"

'// Evaluates to 5
nResult = RT.var( "clojure.core", "eval").invoke( RT.var("clojure.core","read-string").invoke( sClojureExpression ) )

'// Temporary breakpoint
nResult = nResult

End Sub

Rate this thread
WoltLab Burning Board