in reply to Question Marks in Subroutine Names

There's a convention I ran across once, I think in Lisp or Scheme code, of using "p" at the end of a function name that returns a true or false value. (I think the "p" stood for "predicate".) So if you have a function that returns a true value if its argument is odd, false if not, you'd call it "oddp".

This might not be the most, um, intuitive solution to the problem, but it's one more data point...

Replies are listed 'Best First'.
Re: Re: Question Marks in Subroutine Names
by erikharrison (Deacon) on May 08, 2002 at 05:47 UTC

    The Jargon File has a great story about this.

    Cheers,
    Erik