GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Processing
  • Download
  • Reference
  • Environment
  • Libraries
  • Tools
  • Wiki
  • Tutorials
  • Examples
  • Books
  • Forum
  • Overview
  • People
  • Privacy

This view

  • Original page
  • New address

GeezerVison is showing processing.org — null / Reference

Reference+
Documentation→Reference→Structure

Name

null

Description

Special value used to signify the target is not a valid data element. In Processing, you may run across the keyword null when trying to access data which is not there.

Examples

  • String content = "It is a beautiful day.";
    String[] results;  // Declare empty String array
    
    results = match(content, "orange");
    // The match statement above will fail to find
    // the word "orange" in the String 'content', so
    // it will return a null value to 'results'.
    
    if (results == null) {
      println("Value of 'results' is null.");  // This line is printed
    } else {
      println("Value of 'results' is not null!");  // This line is not printed
    }
    
Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.