[fpc-pascal]Strange Segfault...
Marco van de Voort
marcov at stack.nl
Thu Jul 10 17:26:31 CEST 2003
> 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?
More information about the fpc-pascal
mailing list