Difference between revisions of "Talk:Boolean constants"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(seems pertinant to me, though it did need some condensing IMO.)
m
Line 2: Line 2:
  
 
Actually, though it is indeed perhaps a bit wordy and redundant at times, this information does seem quite pertinent to this page. It's the sort of thing that a scripter should be aware of when working with boolean constants in scripts, and since dascript doesn't have an explicit boolean type this seems like the best place for it to me. I'm going to reinstitute it and do some rewriting to make it less of a big block. [[User:BryanDerksen|BryanDerksen]] 15:47, 26 October 2009 (UTC)
 
Actually, though it is indeed perhaps a bit wordy and redundant at times, this information does seem quite pertinent to this page. It's the sort of thing that a scripter should be aware of when working with boolean constants in scripts, and since dascript doesn't have an explicit boolean type this seems like the best place for it to me. I'm going to reinstitute it and do some rewriting to make it less of a big block. [[User:BryanDerksen|BryanDerksen]] 15:47, 26 October 2009 (UTC)
 +
: However '''dascript''' does have boolean logic and that will be covered in the language definition (under the expressions section in my outline). 
 +
: Moreover the '''Example''' section is highly subjective and in my opinion incorrect.  There are quite obviously occasions when testing against <code>TRUE</code> is appropriate: <code>MyFunctionThatReturns2()</code> will equate to '''true''' but <code>MyFunctionThatReturns2() == TRUE</code> will equate to '''false''' so depending on your requirements one of these is an error. In addition an explicit comparison against TRUE or FALSE may clarify your logic and intent which is invariably worth an extra byte code instruction or two. Consquently the phrases "never necessary" and "only really useful" are at the very least misleading.
 +
: The '''Example''' section should be removed or completely rewritten to provide more appropriate advice (though as stated above this would be better in the section on boolean expressions).
 +
: --[[User:Sunjammer|Sunjammer]] 18:40, 26 October 2009 (UTC)

Revision as of 19:40, 26 October 2009

<snip pasted AxeMurderer content- see this revision for it>

Actually, though it is indeed perhaps a bit wordy and redundant at times, this information does seem quite pertinent to this page. It's the sort of thing that a scripter should be aware of when working with boolean constants in scripts, and since dascript doesn't have an explicit boolean type this seems like the best place for it to me. I'm going to reinstitute it and do some rewriting to make it less of a big block. BryanDerksen 15:47, 26 October 2009 (UTC)

However dascript does have boolean logic and that will be covered in the language definition (under the expressions section in my outline).
Moreover the Example section is highly subjective and in my opinion incorrect. There are quite obviously occasions when testing against TRUE is appropriate: MyFunctionThatReturns2() will equate to true but MyFunctionThatReturns2() == TRUE will equate to false so depending on your requirements one of these is an error. In addition an explicit comparison against TRUE or FALSE may clarify your logic and intent which is invariably worth an extra byte code instruction or two. Consquently the phrases "never necessary" and "only really useful" are at the very least misleading.
The Example section should be removed or completely rewritten to provide more appropriate advice (though as stated above this would be better in the section on boolean expressions).
--Sunjammer 18:40, 26 October 2009 (UTC)