[fpc-pascal]Strange Segfault...
James Mills
prologic at daisy.ods.org
Thu Jul 10 18:15:41 CEST 2003
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 - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
--
-
- James Mills
Zero Defect Software Engineers Group - ZDSEG
More information about the fpc-pascal
mailing list