POV-Ray : Newsgroups : povray.off-topic : The other OS : Re: The other OS Server Time
2 Jul 2025 01:39:30 EDT (-0400)
  Re: The other OS  
From: Warp
Date: 7 Aug 2011 11:00:47
Message: <4e3ea89e@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> On 8/5/2011 8:08, Warp wrote:
> > Darren New<dne### [at] sanrrcom>  wrote:
> >> (What would an invariant look like in C?)
> >
> >    I suppose the closest thing is "assert(a<  b);"

> That's not really an invariant, tho. C basically doesn't have the facility 
> to say "any time you're not in one of these N functions, there should be the 
> following relationship between these collection of values:..."

  "In computer science, a predicate is called an invariant to a sequence
of operations provided that: if the predicate is true before starting
the sequence, then it is true at the end of the sequence."

  "Programmers often make use of assertions in their code to make invariants
explicit."

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.