[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sc-devel] sclang segfault



On Dec 3, 2007, at 9:17 AM, blackrain wrote:

ouch
w = {};
w(); is wrong syntax but imo should not crash the lang.
you should use w.() (the shortcut to dot value)
Same thing happens in OS X

I realized later what is the cause of this issue. If you write rand(10), it compiles exactly as if you had written 10.rand. So, rand() is just like... what? .rand (which is a parse error)? ().rand actually doesn't crash, but that's just because () returns an empty Event, so it's legal (if a silly thing to do).

It should be a parse error, I think.

hjh


: H. James Harkins

: jamshark70@xxxxxxxxxxxxxxxxx

: http://www.dewdrop-world.net

.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:


"Come said the Muse,

Sing me a song no poet has yet chanted,

Sing me the universal."  -- Whitman