Hi, I'm still porting code from SpeedSoft's Pascal compiler. The code I am porting often uses MemCopy(), but Free Pascal doesn't seem to have such an implementation. So I looked at the next best thing... Move()
But as the name suggests (...Move()...), I would have expected it to actually move the data and not copy the data. The following example program demonstrates this. Shouldn't S1 = '' after the Move() call? ------------------------------------ Program Example42; { Program to demonstrate the Move function. } Var S1,S2 : String [30]; begin S1 := 'Hello World!'; S2 := 'Bye, bye !'; Move (S1,S2,Sizeof(S1)); Writeln ('S2:', S2); Writeln ('S1:', S1); // Why does this still hold "Hello World!" end. ------------------------------------ Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal