On Thu, Jul 10, 2003 at 05:26:31PM +0200, Marco van de Voort wrote: > > 15 replace(['0'..'9'], w, s); > > (gdb) s > > > > Program received signal SIGSEGV, Segmentation fault. > > $08066073 in main () at test4.pas:15 > > 15 replace(['0'..'9'], w, s); > > (gdb) > > Passing a set ( ['0'..'9'] ) to > > > procedure replace(search: String; replace: String; var s: String); > > procedure replace(const chars: array of char; replace: String; var s: String); > > A string, or a array of char? > > IMHO it is logical that it crashes?
I am passing ['0'..'9'] to a: const chars: array of char; Can't you do this ? If not how else can I rewrite this function ? cheers James > > > _______________________________________________ > fpc-pascal maillist - [EMAIL PROTECTED] > http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- - - James Mills Zero Defect Software Engineers Group - ZDSEG _______________________________________________ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal