Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8835327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:14:03+00:00 2026-06-14T09:14:03+00:00

what does the operators evaluate on instructions? like: var flag:Boolean=true; flag && trace(1) &&

  • 0

what does the operators evaluate on instructions?

like:

var flag:Boolean=true;
flag && trace("1") && trace("2") && trace("3");

output:
1
2
3

var flag:Boolean=true;
flag && trace("1") || trace("2") || trace("3");

output
1

The or operator breaks the sentence under idk what circumstances…

Edit: ok, now i see how the sentence works with the operators, but is any instruction that doesn’t have a return value valuated as true?

And it appears u can’t evaluate any instruction u want, like:

private function any():void{
true && return;
}

that will throw a compilation error.

Edit: In this case, it behaves different to the second example:

true && one() || two() || three();

the functions

private function one():void{
    trace("1");
}
private function two():void{
    trace("2");
}
private function three():void{
    trace("3");
}

output:
1
2
3

Edit: Assigning values:

var a:int;
(a=1) || trace("1");
(a=2) && trace("2");

output:
2

Edit:
|| Returns expression1 if it is true or can be converted to true, and expression2 otherwise

&& “Returns expression1 if it is false or can be converted to false, and expression2 otherwise. Examples of values that can be converted to false are 0, NaN, null, and undefined”.

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/operators.html#logical_OR

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/operators.html#logical_AND

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T09:14:05+00:00Added an answer on June 14, 2026 at 9:14 am

    ActionScript 3 is an ECMAScript variant, which means it’s based off the same standard as JavaScript.

    Because of this && and || are not similar to other C-style languages.

    a || b returns a if a is truthy, otherwise it returns b.

    a && b returns a if a is falsey, otherwise it returns b.

    This makes || essentially equivalent to a ? a : b, and && essentially equivalent to !a ? a : b.

    They also have a short-circuit evaluation mechanism. If the first argument is to be returned, the second argument is not executed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If an expression evaluates multiple && operators, and does not evaluate any operators of
why does void operator<<(ostream out, Test &t); return an error whereas void operator<<(ostream &out,
Possible Duplicate: How can I understand nested ?: operators in PHP? Why does this:
How do I bitwise shift right/left in VB.NET? Does it even have operators for
Does vector::operator= change vector capacity? If so, how? Does vector's copy constructor copy capacity?
I am wondering why the second map declaration (using the diamond operator) does not
What does the /= operator in C# do and when is it used?
How does the is operator determine if two objects are the same? How does
Specifically, in the case of object reference equality, what does the == operator do?
Does java have an equivalent operator or language construct as the verbatim operator(@) in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.