[fpc-pascal] Version 2.1.4

Michael Van Canneyt michael at freepascal.org
Sat Jun 2 20:54:51 CEST 2007



On Sat, 2 Jun 2007, Rainer Stratmann wrote:

> Am Samstag, 2. Juni 2007 20:16 schrieb Florian Klaempfl:
> > > How can I assign "normal" pascalstrings?
> >
> > shortstring
> >
> what does
> 
> var s:string[12];
> 
> in delphimode mean?
> ansistring or shortstring?
> if ansistring, how can I get access to a "normal" pascal (short)string with 
> maximum length of 12?
> 
> var s:shortstring[12];
> 
> does not work in delphi mode.

Obviously, since the definition of shortstring is:

  ShortString = String[255];

So actually your above statement is equivalent to writing

 Var s:string[255][12];

which, you'll agree, is wrong :-)

Michael.



More information about the fpc-pascal mailing list