Backspace in WebTerminal

Primary tabs

I try to run a small test routine (guessing a random number) in WebTerminal but the result looks broken.
in IRISterminal:

 in WebTerminal:

I think it relates to backspace.
Is there some special setting required?

The code:

a
 q=".......... guess [0..9]: " 
 i=1:1 if ! $c(9),"thank you",! q
 q  
b
 !,i,$c(9),q
 f  v#1 q:(v?.1n) " !no number",$c(8,8,8,8,8,8,8,8,8,8,8,8)
 " "
 r=$R(10),p=$s(v="":1,v=r:"!",v>r:"<",1:">")
 x=q,$e(x,r+1)="*",$e(x,v+1)=$s(v=r:"!",v>r:"<",1:">") 
 q:p  $c(13),$c(9),p=v=q

 

  • + 1
  • 0
  • 93
  • 5

Replies

Thanks Peter and Dmitry.

It looks like WebTerminal is just missing a backspace interpretation, client-side.

I can fix this problem once I have some free time, should be quick.

Thanks for reporting!

In deed,

The problem is in the backspace ($ c (8, ......)) because that character is not recognized in an HTML simulation.

Please, try to change this line:

 f  v#1 q:(v?.1n) " !no number", $c(27,91)_12_"D"

This is the ESC [12D statement which is the same than $c(8) but the WebTerminal is able to interpret it

I hope it helps you

Best regards,

Kurro López

probably a misinterpretation from my side:
I expected a terminal emulation, not a HTML simulation

The fact is that is is an ages-old artifact that was a demo written to run on a printing console that had just 7 bit ASCII

Surprising. WebTermal is my first "Terminal Emulation" that doesn't understand full ASCII
I'll remove it from my personal list.