and I think you can do

sName := 'something else'

in the first case and not the second.

If it was this:

Const a = 1;
Const b : integer = 2;

then a would only be a byte, where as b would be an int....

N
----- Original Message -----
From: "Stacey Verner" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Monday, November 12, 2001 12:32 PM
Subject: RE: [DUG]: Const


> Just a guess, but the second one probably uses shortstring, rather than
> string.
>
> Stacey
>
> > -----Original Message-----
> > From: John Christenhusz [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, 12 November 2001 12:30 p.m.
> > To: Multiple recipients of list delphi
> > Subject: [DUG]: Const
> >
> >
> > Hi all,
> >
> > Can anybody tell me the difference between the following two
> > declarations
> > and why you want to use the first one. The second one seems
> > to use less
> > memory!
> >
> >
> > const
> >    sName : string = 'This is a test';
> >
> >
> > and
> >
> > const
> >    sName  = 'This is a test';
> >
> >
> >
> > TIA
> >
> > John.
> >
> > --------------------------------------------------------------
> > -------------
> >     New Zealand Delphi Users group - Delphi List -
> > [EMAIL PROTECTED]
> >                   Website: http://www.delphi.org.nz
> > To UnSub, send email to: [EMAIL PROTECTED]
> > with body of "unsubscribe delphi"
> > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
> >
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to