callWithNoParens
Allow functions calls without parenthesis.
callWithNoParens(true)
callWithNoParens(false)
Description
Once callWithNoParens(true) is called, attempts will be made to treat
the occurrences of variable names not followed by balanced parentheses
as function calls without any arguments. Thus, e.g., a=Vector will assign
to the
variable a a new instance of the class Vector . Likewise, once the function
has been called with false as the argument, a=Vector will assign the
class java.util.Vector to a . The former convention is used by default, i.e., it is not necessary to use empty parentheses for function calls with no arguments.
Example
>>// Even without the explicit call, the constructor is called.
>>a=Vector
>>// The result is a vector with no elements
>>a
[]
>>class(a)
java.util.Vector
>>callWithNoParens(false)
1
>>// The constructor is not called
>>a=Vector
>>a
class java.util.Vector
>>class(a)
java.lang.Class
>>// The implicit call can also be suppressed by using the character $.
>>callWithNoParens(true)
0
>>a=$Vector
>>$a
class java.util.Vector
>>class($a)
java.lang.Class