Ask a Question related to Macromedia Flash Actionscript, Design and Development.
-
FranzTheOne #1
Re: condition
hey jan... i do it like this:
function existRec (name) {
for (i=0; i<recs.length; i++) {
if (recs[i] == name) {
return true;
}
}
return false;
}
FranzTheOne Guest
-
?: condition
eh, probably dumm question but why is asking to return a value not working here? for (var i=0;i< x.length; i++) { x ? : return true : null; } -
ASP, using SQL COUNT as a condition in IF ELSE statement
I am trying to do a simple "less than" conditional statement, and hitting a brick wall if I use a database element with it. This DOES work: <%... -
complex condition
I know there must be a way to do the following: if (($foobar > 3) || ($foo="t" && $bar = "b")) {print "yup"} Of course this is wrong, but what... -
DB2 upgrade condition
Hi all, i've got db2 udb enterprise server v. 7.1 .... it's possible to upgrade to 7.2 or 8.1 ? It's free? Thanks Stefano -
Trying to create a condition statement in
Ampersand. && My mistake was that I did not put the word 'javascript:' in front of the script. mybutton.attributes.add ( "javascript:if... -
JanFlash #2
Re: condition
Yep, that works and is what i am using now.
I am just curious why i can not use the return with condition ? expression : expression...
any thoughts??
JanFlash Guest
-
Jeckyl #3
Re: condition
you can .. you just coded it wrong.
return condition ? value1 : value2;
you cannot put statement in the ?: .. only expressions .. so you cannot have
condition ? return value1 : return value2;
for statements, use if
if (condition) {
return value1;
} else {
return value2;
}
: expression...> I am just curious why i can not use the return with condition ? expression> any thoughts??
Jeckyl Guest
-
JanFlash #4
Re: condition
eh, true, but... it now returns (true or false) no matter what... so it breaks
the loop (at i==0) none of the other index is checked..
so i guess what you are saying is return (statement) cannot be put in only
expressions..
JanFlash Guest



Reply With Quote

