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

Re: [Sc-devel] firstArg - why not valid for all objects?



On Feb 25, 2008, at 8:07 AM, Julian Rohrhuber wrote:

why would you want to use it anywy?

Well, like the example shows - I want the function to return the value of a variable and also clear the variable.

Pfunc({ xyz }) -- doesn't clear

Pfunc({ xyz = nil; xyz }) -- doesn't return the value

Pfunc({ var temp = xyz; xyz = nil; temp }) -- obfuscation (imho) and too much typing to use routinely in patterns

Pfunc({ xyz <! (xyz = nil) }) -- oh, very nice

Except, if xyz is anything other than a number, this throws a math op failed error. Math op failed? What math is being done?

That's what I don't get. Why is this a math operator? What does it have to do with math?
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