[fpc-pascal]Problem with ANSI-Strings
Michael Van Canneyt
michael.vancanneyt at wisa.be
Fri Jul 5 10:28:35 CEST 2002
On Fri, 5 Jul 2002, Philipp Lucas wrote:
> I have a problem with ANSI-Strings. Please take a look at the following
> program, which is a minimal sample of code that produces different
> results depending on whether I use ANSI or short strings.
>
> **START
> {$H-}
>
> PROGRAM t;
>
> FUNCTION STR_neu(w:WORD):STRING;
> VAR d:STRING;
> BEGIN
> STR(w,d);
> exit(d);
This line is the problem. It's a compiler bug !
replace this with
str_neu:=d;
and it will work fine.
To the compiler guys: It's really a bug, it should be fixed somehow.
There is an access violation when using the exit() with ansistrings.
Michael.
More information about the fpc-pascal
mailing list