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

Re: [sc-users] warning in compilation of language



But this means, we could avoid the warning by simply defining the vars outside of the function, right?
Could someone please do so?

thanx

Till


On 01 Sep 2005, at 14:52, James Harkins wrote:

On Sep 1, 2005, at 5:18 AM, Till Bovermann wrote:


Everytime I compile, I get this message:

WARNING: FunctionDef contains variable declarations and so will not be inlined.
   in file '/Common/Collections/Array.sc'
   line 245 char 61 :
var first=this[0], second=this[1], last=this [this.size-1];•
              if (this.lastIndexForWhich{|v,i|
-----------------------------------

I know, that this is not really a problem, but it just looks not that nice...

is there a reason to not declaring the variable outside the function?


It's inside an if branch, so no, it doesn't make a difference except for the warning. Where loops are involved it might be necessary, but not here.

Perhaps there should be a switch to suppress these warnings, or a .plist entry? (Of course, if it's in the plist, it would be one more preference to get lost when the file is corrupted.)

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


_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-users