[fpc-pascal]Incorrect RT 216 error?

Ingmar Tulva juss_it at ut.ee
Sun Feb 17 15:39:03 CET 2002

On Sat, 16 Feb 2002, Jonas Maebe wrote:

}> As I recall, ansistrings start with index 0, not 1 (like shortstrings
}> do). Then this is to be corrected, too. Not sure, though, I always start
}That not correct, they do start at index 1. Only pchar's start at index 0.

Wow, that's surprise. It means, when one does:

  VAR s:Ansistring;


the compiler actually produces code which puts 'something' at address
[s+1]? E.g.

mov EDI,[s]
mov AL,[something]
mov [EDI+1],AL

or similar? Otherwise typecast to PChar wouldn't work.



More information about the fpc-pascal mailing list