comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: use of Pure
Date: 1997/05/24
Date: 1997-05-24T00:00:00+00:00	[thread overview]
Message-ID: <dewar.864472931@merv> (raw)


Matthew said

<<The word is "pure."  And GNAT has a pragma (pragma Pure, I think), so that
you can tell the compiler that a function has no side effect.>>

The pragma Pure is required of any Ada 95 compiler. It specifies that
all subprograms in a unit are side effect free (or at least can be
regarded as being so by the compiler).

What GNAT adds is the pragma Pure_Function, that can be applied to
individual functions with the same effect.

One use of functions being pure is that GNAT allows them without
restriction in address clauses.






                 reply	other threads:[~1997-05-24  0:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox