{"commit":"e466f86a763f89a26274cf01cb6bbe79b251c50c","old_file":"ZUSR_LISP_REPL.abap","new_file":"ZUSR_LISP_REPL.abap","old_contents":"*&---------------------------------------------------------------------*\n*& Report ZUSR_LISP_REPL\n*& https:\/\/github.com\/mydoghasworms\/abap-lisp\n*& Simple REPL for Lisp Interpreter written in ABAP\n*& Martin Ceronio, June 2015\n*& martin.ceronio@infosize.co.za\n*&---------------------------------------------------------------------*\n\nreport zusr_lisp_repl line-size 999.\n\ninclude zlib_lisp.\n\ndata: lr_int type ref to lcl_lisp_interpreter. \"The Lisp interpreter\n\nparameters: input type string lower case.\nparameters: output type string lower case.\n\nat selection-screen output.\n\n* Make result field output-only\n loop at screen.\n if screen-name = 'OUTPUT'.\n screen-input = 0.\n modify screen.\n endif.\n endloop.\n\nat selection-screen.\n* Initialize interpreter if not done yet\n if lr_int is not bound.\n create object lr_int.\n endif.\n\n* Evaluate given code\n output = lr_int->eval_source( input ).\n clear input.\n\nload-of-program.\n* Hitting execute gets us back to this event and initializes the interpreter,\n* so we preferably want to avoid that happening inadvertently:\n perform insert_into_excl(rsdbrunt) using: 'ONLI', 'SPOS', 'PRIN', 'SJOB'.","new_contents":"*&---------------------------------------------------------------------*\n*& Report ZUSR_LISP_REPL\n*& https:\/\/github.com\/mydoghasworms\/abap-lisp\n*& Simple REPL for Lisp Interpreter written in ABAP\n*& Martin Ceronio, June 2015\n*& martin.ceronio@infosize.co.za\n*&---------------------------------------------------------------------*\n\nreport zusr_lisp_repl line-size 999.\n\ninclude zlib_lisp.\n\ndata: lr_int type ref to lcl_lisp_interpreter. \"The Lisp interpreter\n\ndata: rt_begin type i.\ndata: rt_end type i.\n\nparameters: input type string lower case.\nparameters: output type string lower case.\nparameters: runtime type string lower case.\n\nat selection-screen output.\n\n* Make result field output-only\n loop at screen.\n if screen-name = 'OUTPUT' or screen-name = 'RUNTIME'.\n screen-input = 0.\n if screen-name = 'RUNTIME'.\n screen-display_3d = 0.\n endif.\n modify screen.\n endif.\n endloop.\n\nat selection-screen.\n* Initialize interpreter if not done yet\n if lr_int is not bound.\n create object lr_int.\n endif.\n\n* Evaluate given code\n get RUN TIME FIELD rt_begin.\n output = lr_int->eval_source( input ).\n get RUN TIME FIELD rt_end.\n clear input.\n runtime = |{ rt_end - rt_begin } microseconds|.\n\nload-of-program.\n* Hitting execute gets us back to this event and initializes the interpreter,\n* so we preferably want to avoid that happening inadvertently:\n perform insert_into_excl(rsdbrunt) using: 'ONLI', 'SPOS', 'PRIN', 'SJOB'.","subject":"Add runtime measurement to REPL","message":"Add runtime measurement to REPL\n","lang":"ABAP","license":"mit","repos":"mydoghasworms\/abap-lisp,mydoghasworms\/abap-lisp,mydoghasworms\/abap-lisp"}