[fpc-pascal]Problem with ANSI-Strings

Philipp Lucas phlucas at online-club.de
Fri Jul 5 10:02:49 CEST 2002


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);
  END;

BEGIN
  WRITELN('->'+STR_neu(25)+'<-');
END.
**END

When compiling this program with 1.0.6 for DOS without command line 
arguments, it works as expected. If I use {$H+$}, the result of STR_neu 
is not '25'. I can't see /why/ this works differently. Help!

-- 
Philipp Lucas
phlucas at online-club.de





More information about the fpc-pascal mailing list