CompuServe Thread

Forum unknown · Modula-2

#FastFile

11 messages in this thread
#117663From: Brendan PrattApr 6, 1988 7:30 AM
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
#117756From: Jim VogelApr 6, 1988 11:48 PM
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.
#117872From: Brendan PrattApr 7, 1988 7:46 PM
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.
#117872From: Brendan PrattApr 7, 1988 7:46 PM
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.
#117756From: Jim VogelApr 6, 1988 11:48 PM
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.
#118092From: Steve FaiwiszewskiApr 8, 1988 11:31 PM
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 –
#118112From: Brendan PrattApr 9, 1988 1:19 AM
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
#118112From: Brendan PrattApr 9, 1988 1:19 AM
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
#118159From: Jim VogelApr 9, 1988 8:18 AM
Steve, Thanks, its so much easier when somone who knows the program converts it. This will make IO much easier. Thanks again Jim V.
#118159From: Jim VogelApr 9, 1988 8:18 AM
Steve, Thanks, its so much easier when somone who knows the program converts it. This will make IO much easier. Thanks again Jim V.
#118092From: Steve FaiwiszewskiApr 8, 1988 11:31 PM
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 –