CONTENTS | INDEX | PREV | NEXT

 ispunct

 NAME
  ispunct - check for a printable character, except the space,
  letter or digit  character

 SYNOPSIS
  int r = ispunct(c);
  int c;

  This is a MACRO if you #include <ctype.h>, a subroutine call if
  you do not.

 FUNCTION
  Returns non-zero if the character is printable, zero otherwise.

 NOTE
  When a non-zero value is returned, this value can be *anything*
  other than zero.  It is not necessarily a 1.  It is guarenteed to
  fit in a short, however, and still remain non-zero.

  EOF is a valid input and always returns false

 EXAMPLE
  #include <ctype.h>
  #include <assert.h>

  main()
  {
      assert(ispunct(' ')); // true
      assert(ispunct('?')); // false
  }

 INPUTS
  int c;      character that we are checking

 RESULTS
  int r;      0 if the check failed, non-zero if the check is true