ERROR = editopendoc()
IF ERROR \== "" THEN DO
SAY ERROR
RETURN
END
SAY editgetdoc()
ERROR = editselect(,, "" || '0D'x || "SAY 'Line 1'" || '0D'x || "SAY 'Line 2'" || '0D'x || "str = ' DO'", 'TEXT')
IF error == "" THEN RETURN
ERROR = editselect(,, '0D'x || " END", 'TEXT')
IF ERROR == "" THEN RETURN
myvar.0 = 3
myvar.1 = 'Compound line 1'
myvar.2 = 'Compound line 2'
myvar.3 = 'Compound line 3'
ERROR = editselect(,, 'MyVar')
IF ERROR \== "" THEN SAY "Success"
ERROR = editgettext('MyVar', '1 1', '1 -1')
IF ERROR \== "" THEN SAY ERROR
ELSE DO
SAY "Read" myvar.0 "lines"
SAY myvar.1
END
ERROR = editgettext('MyVar', '2 6', '3 3')
IF ERROR \== "" THEN SAY ERROR
ELSE DO
SAY "Read" myvar.0 "lines"
SAY myvar.1
SAY myvar.2
END
ERROR = editgettext('MyVar', '1 1', '-1 -1')
IF ERROR \== "" THEN SAY ERROR
ELSE DO
SAY "Read" myvar.0 "lines"
DO i = 1 TO myvar.0
SAY myvar.i
END
END
SAY editmove('HOME')
SAY editmove()
SAY editmove('DOWN')
SAY editmove('UP')
SAY editmove('RWORD')
SAY editmove('LWORD')
SAY editsetflag('UNNAME', 2)
SAY editsetflag()
SAY editmove('UP')
SAY editsetflag()
SAY editfindflag('HOME|ERROR')
SAY editfindflag('ERROR')
SAY editfindflag('UP|ERROR')
SAY editselect()
SAY editselect('1 1', '1 1')
SAY editselect('-1 -1', '-1 -1')
SAY editselect('1 1', '1 -1')
SAY editselect(, , "Line 1" || '0D'x || "Line 2", 'TEXT')
SAY editselect('2 1', '2 -1', "")
DO UNTIL err = ""
err = editfind('do')
SAY err
END
DO UNTIL err = ""
err = editfind('do', 'WRAP')
SAY err
END
DO UNTIL err = ""
err = editfind('do', 'WORD|WRAP')
SAY err
END
ERROR = editopendoc()
IF ERROR \== "" THEN SAY ERROR
ELSE SAY editgetdoc()
ERROR = editopendoc(, 1)
IF ERROR \== "" THEN SAY ERROR
ELSE SAY editgetdoc()
ERROR = editopendoc("test.rex")
IF ERROR \== "" THEN SAY ERROR
ELSE SAY editgetdoc()
ERROR = editopendoc("c:\test.rex")
IF ERROR \== "" THEN SAY ERROR
ELSE SAY editgetdoc()
ERROR = editopendoc("")
IF ERROR \== "" THEN SAY ERROR
ELSE SAY editgetdoc() |