encode_text_input.p
1 |
def var txt as char. |
---|---|
2 |
def var e-txt as char format "x(16)". |
3 |
def var i-file as char init "text_string_input.txt". |
4 |
def var o-file as char init "encoded.txt". |
5 |
def var idx as int. |
6 |
def var i as int. |
7 |
|
8 |
def stream infile. |
9 |
def stream out. |
10 |
|
11 |
input stream infile from value(i-file). |
12 |
output stream out to value(o-file). |
13 |
|
14 |
do while (true) on endkey undo, leave: |
15 |
|
16 |
import stream infile unformatted txt. |
17 |
|
18 |
e-txt = encode(txt). |
19 |
|
20 |
put stream out unformatted e-txt skip. |
21 |
end. |
22 |
|
23 |
input stream infile close. |
24 |
output stream out close. |