Hello Martin, Monday, May 12, 2008, 11:27:08 PM, you wrote:
MF> Hi, MF> I am trying to find some info on how I can use move to archive the MF> following: MF> I am looking for an equal replacement of MF> move(somepchar^, ansi_str_dest[1], 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: move(somepchar^,pchar(ansi_str_dest)^,len); as typecasting an ansistring to a pchar should return (repeat "I think") a pointer to ansi_str_dest[1], and if length(ansi_str_dest)=0 then the pointer should be $00000001 :-? which should not raise any kind of range check. -- Best regards, JoshyFun _______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-devel
