home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
- # include "strings.h"
-
- procedure assignS{(var lhs: String; rhs: String)};
- {
- * lhs := rhs
- }
- begin
- if lhs <> rhs then begin { -- Care with case, e.g., assignS(x,x) }
- disposeS(lhs);
- if rhs = nil then { -- Empty string } lhs := nil
- else begin
- lhs := rhs; { -- Ref. copy }
- with rhs^ do REFS := REFS+1
- end
- end
- end{ -- assignS};
-