view graal/com.oracle.truffle.sl.test/tests/Null.sl @ 13821:b16ec83edc73

Documentation and more refactoring of Simple Language
author Christian Wimmer <christian.wimmer@oracle.com>
date Wed, 29 Jan 2014 20:45:43 -0800
parents
children
line wrap: on
line source

/* The easiest way to generate null: a function without a return statement implicitly returns null. */
function null() {
}

function main() {  
  println(null());  
  println(null() == null());  
  println(null() != null());  
  println(null() == 42);  
  println(null() != 42);  
  println(null() == "42");  
  println(null() != "42");  
}