(* How about using "set of char" instead of "array of char" ? That way, the compiler should be able to distinguish between the overloads... *) program repl;
type tSetOfChar = set of char; procedure replace(chars: tSetOfChar; const replace: String; var s: String); var i: Integer; begin for i:=length(s) downto 1 do if (s[i] in chars) then begin delete(s, i, 1); insert(replace, s, i); end; end; var w, s:string; begin s:='a1ebf2c3d45'; readln(w); replace(['0'..'9'], w, s); writeln(s); end. __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com _______________________________________________ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal