examples\book\digital-artists\chapter5\Listing5.3.ck
// Listing 5.3 Defining and testing a MIDI interval function

// Function definition
fun int interval( int note1, int note2)
{
    note2 - note1 => int result;
    return result;
}

// Main program, test and print
interval(60,72) => int int1;
interval(67,60) => int int2;

<<< int1, int2 >>>;
home .. language .. program .. examples