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

  • SEARCH
  • Home
  • 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 7178387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:54:41+00:00 2026-05-28T16:54:41+00:00

Which logic would be better or effecient: IF VAR-A = FALSE MOVE VAR-C TO

  • 0

Which logic would be better or effecient:

IF VAR-A = FALSE
   MOVE VAR-C TO VAR-B
ELSE
   MOVE VAR-A TO VAR-B
END-IF

or

MOVE VAR-A TO VAR-B
IF VAR-A = FALSE
   MOVE VAR-C TO VAR-B
END-IF
  • 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-05-28T16:54:42+00:00Added an answer on May 28, 2026 at 4:54 pm

    In general, either is fine and you should leave the optimization to your compiler.

    However, since source code is written for humans to understand what prior programmers have created, I would say:

    Use this form if either condition is likely to occur:

    IF VAR-A = FALSE
       MOVE VAR-C TO VAR-B
    ELSE
       MOVE VAR-A TO VAR-B
    END-IF
    

    But in a case where the IF condition is a very rare kind of thing and the unqualified MOVE is the 99% condition, try this approach, as it highlights the fact that VAR-A=FALSE is a rare and special thing:

    MOVE VAR-A TO VAR-B
    IF VAR-A = FALSE
       MOVE VAR-C TO VAR-B
    END-IF
    

    Just my NSH $0.02. Either works well as long as you remember that the compiler will take most any crap you feed it, your primary concern is the next human that must read your program.

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

Sidebar

Related Questions

I would like to create an ASP.NET MVC web application which has extensible logic
This is more of a general question about which direction would be a better
In our project we have UI and logic (which may be represented as a
I've got some SQL which performs complex logic on combinations of GL account numbers
I am working on an artificial intelligence project which is a logic game and
I have a ASP.NET MVC page, which call WCF logic. The system is single-signon
I have some logic, which defines and uses some user-defined types, like these: class
Apache URL rewrite logic can be written either in conf or .htaccess file. Which
I'm adding some lazy initialization logic to a const method, which makes the method
I have a method in my business logic layer that accepts a stream, which

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.