I have create the xor ascii file
0 0 0
1 0 1
0 1 1
1 1 0
with note pad (windows )and saved it as txt file. I try to read with qpc2 from dos2_ device
input#4 X(i),y(i),z(i) but it inputs the firts column only. How can I make it input by rows?
Reading ASCII FILES
-
- RWAP Master
- Posts: 2834
- Joined: Sun Nov 28, 2010 4:51 pm
- Location: Stone, United Kingdom
- Contact:
Re: Reading ASCII FILES
The spaces are probably the problem....
The statement -
is trying to fetch 3 lines of numbers
The first three lines you have are invalid numbers after the first column, as a space cannot be converted to a number.
You need to use:
The statement -
Code: Select all
input#4 X(i),y(i),z(i)
The first three lines you have are invalid numbers after the first column, as a space cannot be converted to a number.
You need to use:
Code: Select all
OPEN #4,'dos2_xor.txt'
i=1
REPeat loop
IF EOF(#4) EXIT loop
INPUT #4, a$
x(i)=a$(1)
y(i)=a$(3)
z(i)=a$(5)
i=i+1
END REPeat loop
CLOSE #4
Rich Mellor
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm