Discussion (14)1
Log in or sign up to continue

use local routine. like:

a<tab>for i=1:1:100 {
<tab>/// do one line
<tab>///do something else

do a   ;to run it

to edit/show  your line use ZI, ZR, PRINT  

ATTENTION: you need a REAL terminal. 
WebTerm, Studio, .... just can process  single lines as they are only Terminal SIMULATIONS using eXECUTE command

If you call routines or classes you should temporarily save your lines before execution
e.g.  ZS temp

Oh. Or make a small program, which does the thing - multiline editor for terminal. very simple. Just to have an option copy-paste several lines of code and run it in terminal

ZS temp creates temp.int

Cool! Wanted something like that for ObjectScript

Wow. This is fast! Thanks Robert!

Need a zpm package ;)

Would you like us to post feature requests here, on GitHub, or not at all? laugh

For example, I want to be able to go back and edit a previously entered line before execution ...

Pls. use GitHub.
That makes it easier to follow and complete

In fact, It works!


zpm: USER>install terminal-multiline

[terminal-multiline]    Reload START
[terminal-multiline]    Reload SUCCESS
[terminal-multiline]    Module object refreshed.
[terminal-multiline]    Validate START
[terminal-multiline]    Validate SUCCESS
[terminal-multiline]    Compile START
[terminal-multiline]    Compile SUCCESS
[terminal-multiline]    Activate START
[terminal-multiline]    Configure START
[terminal-multiline]    Configure SUCCESS
[terminal-multiline]    Activate SUCCESS
zpm: USER>q

Usage with copy-n-paste from docs:

USER>d ^%zml
Entering multi line mode. Run with empty line. Stop with single "."
USER:zml:1> SET x=8
USER:zml:2>   FOR { WRITE "Running loop x=",x,!
USER:zml:3>         SET x=x-1
USER:zml:4>         QUIT:x=3
USER:zml:5>       }
USER:zml:6>   WRITE "Next command after FOR code block"
Running loop x=8
Running loop x=7
Running loop x=6
Running loop x=5
Running loop x=4

Next command after FOR code block

It works like a charm!

Bravo, @Robert Cemper!