Console
In order to perform faster and efficient print operation, SRON provides 'Console' attribute.
Syntax:
console : (value1 , value2)
Note: 'Console' requires only value type tokens.
Examples:
Correct Syntax:
console : (val1 , val2 , val3)
or
console : (val1 , get_val(), "SRON", true, 1234.553)
------------
Wrong Syntax:
@ you need to insert all variables
@ within round-brackets
console : val1 , val2
or
@ expects tokens which gives some value
console : (val1, continue , break)
Sample code to print values using 'console' attribute
{
name : Main
Int val1 = 2706
Int val2 = 2003
console : (val1, val2)
console : ("\tSaksham")
}
OUTPUT:
27062003 Saksham
Note:
Unlike println() function, it does not add a new line after printing values.
It is faster than
print()
&println
because it buffers the output before printing on console.
Last updated