Console
The console object allows you to print any value to the console of HISE
.
Console.print("Hello World " + 3.4); // Prints "Hello World + 3.4 to the console.
Console.assertEqual(x, y); // You could write assertion tests to check your code.
Console.start(); // You can benchmark your scripts Compile-time with:
Console.stop(); // wrapping these two Console commands around your code.
Class methods
assertEqual
Throws an error message if the values are not equal.
Console.assertEqual(var v1, var v2)
assertIsDefined
Throws an error message if the value is undefined.
Console.assertIsDefined(var value)
assertIsObjectOrArray
Throws an error message if the value is not an object or array.
Console.assertIsObjectOrArray(var value)
assertLegalNumber
Throws an error message if the value is not a legal number (eg. string or array or infinity or NaN).
Console.assertLegalNumber(var value)
assertNoString
Throws an error message if the value is a string.
Console.assertNoString(var value)
assertTrue
Throws an error message if the condition is not true.
Console.assertTrue(var condition)
blink
Sends a blink message to the current editor.
Console.blink()
breakInDebugger
Throws an assertion in the attached debugger.
Console.breakInDebugger()
clear
Clears the console.
Console.clear()
Prints a message to the console.
Console.print(var debug)
startBenchmark
Starts the benchmark. You can give it a name that will be displayed with the result if desired.
Console.startBenchmark()
stop
Causes the execution to stop().
Console.stop(bool condition)
stopBenchmark
Stops the benchmark and prints the result.
Console.stopBenchmark()