Output and return to console on next line

Q&A's, tips, howto's
Locked
HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Output and return to console on next line

Post by HPW »

I am not sure what can be done to reach this. Is it possible by
modifying the TK front end or does it need a new function in newLISP.

So when I do this:

Code: Select all

> (silent(print "Test"))
Test_
The cursor (_) stay behind Test and does not return to the prompt.
When I hit on enter again it shows:

Code: Select all

> (silent(print "Test"))
Test

> _
What I want, is a silent with return to prompt:

Code: Select all

> (silentret(begin(DoMyProc)(print "Done")))
Done
> _
For what can it be used. I want to make my own app with a console window
with a small height (only a few lines) at the bottom of the screen.
The user should be able to type in a command and get a feedback
on the line above of the prompt-line.

Possible?
Hans-Peter

Sammo
Posts: 180
Joined: Sat Dec 06, 2003 6:11 pm
Location: Loveland, Colorado USA

Post by Sammo »

Hi Hans-Peter,

You could fake it!

Code: Select all

> (define (resume) (print "\r\n> "))
> (define (myfunction) "this is myfunction's return value")
> (silent (myfunction) (print "Done") (resume))
Done
>

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

Hi Sam,

Excellent and creative idea!
You always get the maximum out of our tools!
Thanks a lot.
Hans-Peter

Locked