Android Question B4A Interpreter

Discussion in 'Android Questions' started by Adie, Sep 21, 2017.

  1. Adie

    Adie Member Licensed User

    Hi
    I am looking for an interpreter that I can use to execute a .BAS file at runtime.
    The B4A app must be able to post the variables to the interpreter and then call the code (maybe a SUB). On return from the sub the required variables must be 'read' back and local processing will continue.

    I am porting an industrial control program from Windows (C++) to Android things. We currently use a product 'FastScript' that can compile C++ code on the fly and execute it almost at main app speed. It is seen as an object by the host app. All variables in the script have read/write access from the main app.

    I looked at this: https://www.b4x.com/android/forum/t...-for-android-programming-on-the-device.41468/
    As I am new (seldom use) to B4A I've got no clue where to start.

    Any Ideas?

    Adie
     
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. Adie

    Adie Member Licensed User

    Ok, I found BeanShell, a full Java interpreter. Look Here: http://www.beanshell.org/intro.html

    There is a downloadable .JAR file (bsh-core) which is all I need to 'get into B4A' :)

    Questions:
    1: how do I generate the .XML file from the JAR?
    2: before I spend too much time on this, will this work?

    Adie
     
  4. Adie

    Adie Member Licensed User

    And then I found BasicLib 1.4 from agraham that will work for now so I can carry on with the development.

    I would prefer BeanShell. Still don't know how to access the subs in the BeanShell JAR file which I would like to use.

    Adie
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice