Forum unknown
· Modula-2
#FastFile
11 messages in this thread
Hi Steve,I said i'd get back in touch about the probs i'm having at
converting fast fileio from tdi to Benchmark.As you realise i'm still
learning M2. Here they are:in Procedure CommonOpen var tmp : FileHandle;
begin tmp := Open(Name,Mode); gives the error 133 Incompatible
Assignment
Throughout the file there is INC(IndexPtr) and INC(TmpBuf) both giving error
144 Incorrect type of parameter of standard procedure
next one is For i := 1 TO CharsToMove DO gives a error 117 Incompatible
operand types
Final one is at the end IF DOSBase = NIL THEN
DOSBase := OpenLibrary(DOSName,0) END giving error 133 again.
OK i know you have a lot more to do than mess around with things like this
that I should know how to fix myself(i will one day!)But all help is
appreciated,especially when i am the only one over here in OZ that has
Benchmark!! Will you be reposting the serial port stuff when you Benchmark
ise it??
Thanks again
Brendan Pratt
Brendan,
I had once tried to convert Steve's file over to Benchmark, but for a
variety of reasons, decided not to. But, here's somethings I came up with
while doing it.
1: Open expects Name to be an ADDRESS, not a String! So pass it
ADR(string)… tmp := Open(ADR(MyFile),Mode);
2: You cant increment pointers in Benchmark…However, you can inc
address's, SO…
tmpadr : ADDRESS;
tmpadr := IndexPtr;
INC(tmpadr);
IndexPtr := tmpadr;
Now I has assumed when I was trying to convert this originally, that you
COULD NOT do this, one of the reason's I gave up. But Steve, and a few other
people have told me that you CAN, unless I misunderstood Steve.
3: This is due to some of the var being INTEGER's and other's being CARDINAL;
You can fix this by type casting…
FOR i := 1 to CARDINAL(CharsToMove) DO
I'm Not sure which is a CARDINAL, and which is an INTEGER, but just look at
the VAR decleration's.
4: In Benchmark, there is a module called System (NOT the same as SYSTEM!!!)
That opens allmost all you're librares for you. So you don't need to OPEN,
or CLOSE , Libraries at all. There are some things worth looking at in this
module, so check it out.
BTW, if Steve, or anyone else, say's that num 2 above is incorrect,
I would go by what they say, as I could have misunderstood Steve in his
message to me.
Good luck, and hope this helps, Jim Vogel
ps There are a bunch of message under FastFileIO in this sub 12 that talk
about INC(Pointers). Take a look at them , and see if you agree with what I
said about this.
Thanks Jim,i'll give it a go when i get off of here.I just wish i knew a
bit more about Modula-2 than what i do. Thanks again.
Thanks Jim,i'll give it a go when i get off of here.I just wish i knew a
bit more about Modula-2 than what i do. Thanks again.
Brendan,
I had once tried to convert Steve's file over to Benchmark, but for a
variety of reasons, decided not to. But, here's somethings I came up with
while doing it.
1: Open expects Name to be an ADDRESS, not a String! So pass it
ADR(string)… tmp := Open(ADR(MyFile),Mode);
2: You cant increment pointers in Benchmark…However, you can inc
address's, SO…
tmpadr : ADDRESS;
tmpadr := IndexPtr;
INC(tmpadr);
IndexPtr := tmpadr;
Now I has assumed when I was trying to convert this originally, that you
COULD NOT do this, one of the reason's I gave up. But Steve, and a few other
people have told me that you CAN, unless I misunderstood Steve.
3: This is due to some of the var being INTEGER's and other's being CARDINAL;
You can fix this by type casting…
FOR i := 1 to CARDINAL(CharsToMove) DO
I'm Not sure which is a CARDINAL, and which is an INTEGER, but just look at
the VAR decleration's.
4: In Benchmark, there is a module called System (NOT the same as SYSTEM!!!)
That opens allmost all you're librares for you. So you don't need to OPEN,
or CLOSE , Libraries at all. There are some things worth looking at in this
module, so check it out.
BTW, if Steve, or anyone else, say's that num 2 above is incorrect,
I would go by what they say, as I could have misunderstood Steve in his
message to me.
Good luck, and hope this helps, Jim Vogel
ps There are a bunch of message under FastFileIO in this sub 12 that talk
about INC(Pointers). Take a look at them , and see if you agree with what I
said about this.
I see that Jim Vogel already answered some of your questions. Rather than
elaborate, I've simply decided to uploaded a version of FastFileIO for
Benchmark. As soon as the SYSOPs clear it, it will appear in DL12. I've
also uploaded my old Serial module, adapted to Benchmark. Hope this will do
the trick.
– Steve –
Thanks Steve,i appreciate your time with this problem,and as i have said
before I will learn to use M2 rather than get everyone else to do it for me!!
Thanks again.
Brendan Pratt
Thanks Steve,i appreciate your time with this problem,and as i have said
before I will learn to use M2 rather than get everyone else to do it for me!!
Thanks again.
Brendan Pratt
Steve, Thanks, its so much easier when somone who knows the program converts
it. This will make IO much easier.
Thanks again
Jim V.
I see that Jim Vogel already answered some of your questions. Rather than
elaborate, I've simply decided to uploaded a version of FastFileIO for
Benchmark. As soon as the SYSOPs clear it, it will appear in DL12. I've
also uploaded my old Serial module, adapted to Benchmark. Hope this will do
the trick.
– Steve –