[fpc-devel] move(xx, ansistring versus ansistring, len)
joshyfun at gmail.com
Tue May 13 00:10:53 CEST 2008
Monday, May 12, 2008, 11:27:08 PM, you wrote:
MF> I am trying to find some info on how I can use move to archive the
MF> I am looking for an equal replacement of
MF> move(somepchar^, ansi_str_dest, len)
MF> I could prefix it with "if length(dest) > 0 then ", but I would prefer
MF> something less noticeable...
I had not checked it but I think you can use the typecasting:
as typecasting an ansistring to a pchar should return (repeat "I
think") a pointer to ansi_str_dest, and if length(ansi_str_dest)=0
then the pointer should be $00000001 :-? which should not raise any
kind of range check.
More information about the fpc-devel