-
Notifications
You must be signed in to change notification settings - Fork 5
Home
Jacques Nomssi edited this page Jan 1, 2018
·
69 revisions
- Style: http://community.schemewiki.org/?scheme-style
- Tutorials: SICP / HtDP / UCSC
- Specification R6RS: http://www.r6rs.org/
- How to make your own: https://github.com/kanaka/mal/blob/master/process/guide.md
- IDE: run report ZZ_LISP_IDE
- Features
- Sample Code
Class lcl_lisp_interpreter
evaluates your Scheme code in a string code
, using either method eval_repl( code )
which throws an exception on errors, or method eval_source( code )
catches exception:
DATA(response) = NEW lcl_lisp_interpreter( )->eval_source( code ).
For a dynamic IF statement
( PLAAB = '02' ) and ( DELKZ = 'BB') and ( LIFNR > '' ) and ( PLUMI = '-')
we concatenate the following Scheme expression in a string variable code
and evaluate.
(let
; Define local fields
(PLAAB (ab-data "GS_MDPS-PLAAB" ))
(DELKZ (ab-data "GS_MDPS-DELKZ" ))
(LIFNR (ab-data "GS_MDPS-LIFNR" ))
(PLUMI (ab-data "GS_MDPS-PLUMI" ))
(and (= PLAAB '02') (= DELKZ 'BB') (> LIFNR '') (= PLUMI '-')) )
The result on the expression either #t
or #f
.
(let (( profiles
(let ( (f3 (ab-function "BAPI_USER_GET_DETAIL")) )
( begin (ab-set f3 "USERNAME" (ab-get ab-sy "UNAME") )
(f3) (ab-get f3 "PROFILES") ) )
) )
(let ((profile (ab-get profiles 1)) )
(ab-get profile "BAPIPROF" ) )
INTERFACE lif_port.
METHODS write IMPORTING element TYPE REF TO lcl_lisp
RETURNING VALUE(rv_input) TYPE string.
METHODS read IMPORTING iv_input TYPE string OPTIONAL
RETURNING VALUE(rv_input) TYPE string.
ENDINTERFACE.