isDigit() \ Language (API) \ Wiring ALPHA 1.0
Author: Hernando Barragán
Description: Wiring is an electronic sketchbook and hardware electronics for developing ideas. It is a context for learning fundamentals of computer programming and prototyping with electronics within the context of the electronic arts.
Keywords: Wiring, Processing, Interactive Media, Electronic Arts, Programming, C, C++, Hernando Barragán

Search wiring.org.co:

Reference for Wiring version 0024+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.

Name | ### isDigit()
Examples |
    char tab = 't';    // tab character
    char digit = '1';   // digit character
    char upperA = 'A';  // upper case 'A'
    char lowerA = 'a';  // lower case 'a'
    char colon = ',';   // comma
    char val;

    void setup()
    {
      Serial.begin(9600);

      val = toLowerCase(upperA);
      Serial.print(val);                        // prints 'a'
      Serial.print(" ");
      Serial.print(isAlphaNumeric(digit),DEC);  // prints 1 (true)
      Serial.print(" ");
      Serial.print(isAlpha(upperA),DEC);        // prints 1 (true)
      Serial.print(" ");
      Serial.print(isAscii(upperA),DEC);        // prints 1 (true)
      Serial.print(" ");
      Serial.print(isWhitespace(tab),DEC);      // prints 1 (true)
      Serial.print(" ");
      Serial.print(isGraph(lowerA),DEC);        // prints 1 (true)
      Serial.print(" ");
      Serial.print(isLowerCase(lowerA),DEC);    // prints 1 (true)
      Serial.print(" ");
      Serial.print(isSpace(val),DEC);           // prints 0 (false)
      Serial.print(" ");
      Serial.print(isUpperCase(upperA),DEC);    // prints 1 (true)
      Serial.print(" ");
      Serial.print(isControl(upperA), DEC);     // prints 0 (false)
      Serial.print(" ");
      Serial.print(isDigit(digit), DEC);        // prints 1 (true)
      Serial.print(" ");
      Serial.print(isGraph(digit), DEC);        // prints 1 (true)
      Serial.print(" ");
      Serial.print(isPunct(colon), DEC);        // prints 1 (true)
      Serial.print(" ");
      Serial.print(isHexadecimalDigit('F'), DEC);  // prints 1 (true)
      Serial.print(" ");
      val = toLowerCase('K');                   // prints 'k'
      Serial.print(val);
      Serial.print(" ");
      val = toAscii(40);
      Serial.println(val);                      // prints '('
    }

    void loop()
    {

    }
Description | Checks for a digit (0 through 9).
Syntax |
    isDigit(var)
Parameters |
var | int or char variable name referencing the value
Returns | boolean: true or false
Usage | Application
Related | isAlphaNumeric() isAlpha() isAscii() isWhitespace() isControl() isDigit() isGraph() isLowerCase() isPrintable() isPunct() isSpace() isUpperCase() isHexadecimalDigit()

Updated on January 25, 2010 10:57:59pm PST