On Fri, Sep 22, 2006 at 01:42:33AM -0700, Paul van den Bogaard
wrote:> The following construct is accepted by Dtrace in an action block
> 
> 1 ? exit(1) : 1;
> 
> However the following is not:
> 
> a = 1
> a == 1 ? exit(1) : 1;
> 
> Error message is:
> operator ?: operands must have compatible types.
> 
> Would like to understand why this is.
Because enabling control blocks must be of constant size; allowing 
incompatible types with the ''?'' operator would allow an ECB of
varying
size to be created. 
	- Bryan
--------------------------------------------------------------------------
Bryan Cantrill, Solaris Kernel Development.       http://blogs.sun.com/bmc