The string is first written to a temporary file, which is *EXECed; this causes it to be entered into the INPUT statement as if it had been typed by the user. The usual line editing features of the INPUT statement can then be used to modify the string; pressing Enter returns it to the program.
Code: Select all
text$ = "The quick brown fox jumps over the lazy dog" tempfile$ = @tmp$ + "edit.tmp" F% = OPENOUT(tempfile$) BPUT #F%, text$; CLOSE #F% OSCLI "exec """ + tempfile$ + """" INPUT LINE "" edited$ PRINT edited$
It works in both BB4W and BBCSDL.