Re: Fastcode CharPosRev B&V 0.6.0




The negative offsets are only use to set base addresses. At no time is
memory outside of that allocated to the string ever referenced.
I'm sorry..
you're right.. you start at the top... in the worst case (length = 1) you'll
only read part 0 --> -3 ..
should have thought about that

I am no concerned about needing the $R-. All this means is that the
programmer must take responsibility for range checking instead of the
compiler. The need for R- is very common where performance is the main
criteria (try compiling the RTL with range checking on!).

O, I totaly agree. The only reason I'm saying that is because it was one of
the rules
on the fastcode website..

Oh, and trying to make it type checking safe...
you could just change
P := @S[Result - 11];
to
P := Pointer((Cardinal(S) +Cardinal(Result)) - 12);

(so my version can be completly ignored :D)

Regards,
Davy Landman


.


Quantcast