www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Meaning of invariant

reply Edward Diener <eddielee_no_spam_here tropicsoft.com> writes:
I could not find any explanation for the keyword 'invariant' in the PDF 
doc. Is it the equivalent of the C++ 'const' in at least some of the 
latter's usages ?

The only explanation for it existed as part of Contract Programming, but 
it seems to be used otherwise also.
Feb 09 2008
next sibling parent reply "Tyro[a.c.edwards]" <no spam.com> writes:
Edward Diener さんは書きました:
 I could not find any explanation for the keyword 'invariant' in the PDF 
 doc. Is it the equivalent of the C++ 'const' in at least some of the 
 latter's usages ?
 
 The only explanation for it existed as part of Contract Programming, but 
 it seems to be used otherwise also.
http://www.digitalmars.com/d/2.0/const3.html
Feb 09 2008
parent "Tyro[a.c.edwards]" <no spam.com> writes:
Tyro[a.c.edwards] さんは書きました:
 Edward Diener さんは書きました:
 I could not find any explanation for the keyword 'invariant' in the 
 PDF doc. Is it the equivalent of the C++ 'const' in at least some of 
 the latter's usages ?

 The only explanation for it existed as part of Contract Programming, 
 but it seems to be used otherwise also.
http://www.digitalmars.com/d/2.0/const3.html
If I recall correctly invarinats were not introduced until 2.0 so you won't find int in 1.0 documentation or usage. Regards, Andrew
Feb 09 2008
prev sibling parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Edward Diener" <eddielee_no_spam_here tropicsoft.com> wrote in message 
news:foldqs$47f$1 digitalmars.com...
I could not find any explanation for the keyword 'invariant' in the PDF 
doc. Is it the equivalent of the C++ 'const' in at least some of the 
latter's usages ?

 The only explanation for it existed as part of Contract Programming, but 
 it seems to be used otherwise also.
In D1, it's only used in Contract Programming.
Feb 10 2008
parent reply Edward Diener <eddielee_no_spam_here tropicsoft.com> writes:
Jarrett Billingsley wrote:
 "Edward Diener" <eddielee_no_spam_here tropicsoft.com> wrote in message 
 news:foldqs$47f$1 digitalmars.com...
 I could not find any explanation for the keyword 'invariant' in the PDF 
 doc. Is it the equivalent of the C++ 'const' in at least some of the 
 latter's usages ?

 The only explanation for it existed as part of Contract Programming, but 
 it seems to be used otherwise also.
In D1, it's only used in Contract Programming.
Thanks ! I do hope there will be a doc pdf version of D2.
Feb 10 2008
parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Edward Diener" <eddielee_no_spam_here tropicsoft.com> wrote in message 
news:fonkmi$2hla$1 digitalmars.com...

 Thanks !

 I do hope there will be a doc pdf version of D2.
Honestly, what's wrong with using your web browser?
Feb 10 2008
parent reply Edward Diener <eddielee_no_spam_here tropicsoft.com> writes:
Jarrett Billingsley wrote:
 "Edward Diener" <eddielee_no_spam_here tropicsoft.com> wrote in message 
 news:fonkmi$2hla$1 digitalmars.com...
 
 Thanks !

 I do hope there will be a doc pdf version of D2.
Honestly, what's wrong with using your web browser?
I find it much easier to download a pdf document and view it locally. It also can be printed off, either in part or wholly, for studying away from a computer.
Feb 11 2008
parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Edward Diener" <eddielee_no_spam_here tropicsoft.com> wrote in message 
news:foqjqp$ic1$3 digitalmars.com...
 I find it much easier to download a pdf document and view it locally. It 
 also can be printed off, either in part or wholly, for studying away from 
 a computer.
*gasp* Away... from a _computer_?? There's such a place?
Feb 11 2008