comp.lang.ada
 help / color / mirror / Atom feed
* use of Pure
@ 1997-05-24  0:00 Robert Dewar
  0 siblings, 0 replies; only message in thread
From: Robert Dewar @ 1997-05-24  0:00 UTC (permalink / 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.






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-05-24  0:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-05-24  0:00 use of Pure Robert Dewar

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