Links

Categories

Tags


« | Main | »

Type-less variables

By Jewe | October 29, 2012

function main()
{
    // define some type-less variables
    var anInt = 5;
    var aFloat = 5.34;
    var aString = "a string";

    // create a type-less array
    var[] anything = { anInt, aFloat, aString };

    // format the array's contents into a string and print
    println( anything.format("%d, %f, %s") );
}

Topics: code examples | Comments Off on Type-less variables

Comments are closed.