>   writeln('Let''s combine a short string with a wordstring.. (press enter)');
>   readln;
>   sstring:= ', interesting world.';
>   WordStrConcat(sstring, wordstr1); // no memory allocated

sorry, forgot to include the actual shortstring overloaded function - my copy 
and paste
skills are getting poor.

{ concatenates a short string with a wordstring .. overloaded}
procedure WordStrConcat(const s1: shortstring; var dest: TWordStr);
begin
  move(pchar(@s1[1])^, pchar(@dest[WordStrLen(dest)+1])^, Length(s1));
end;


_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to