CompuServe Messages

FastFile

#: 117756 S12/Modula-2Forum unknown
    06-Apr-88 23:48:09
Sb: #117663-FastFile
Fm: Jim Vogel 73177,441
To: Brendan Pratt 72757,3043

This message turned up in search, but its forum couldn’t be identified from the original transcript, so it may not be linked into its thread.

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.