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 515171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:36:02+00:00 2026-05-13T07:36:02+00:00

Is it standard across all languages for the following to yield the value 3?

  • 0

Is it standard across all languages for the following to yield the value 3?

Print(6 - 2 - 1)

In other words, are there any languages that will evaluate ” 2 – 1 ” before ” 6 – 2 “?

I’d like to make this assumption so that I can quit instinctively inserting parentheses ((6 – 2) – 1). It leave me at risk of LISP nightmares.

Thanks

  • 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-13T07:36:02+00:00Added an answer on May 13, 2026 at 7:36 am

    Generally when multiple operations have the same precedence they are evaluated from left to right similar to arithmetic. I wouldn’t want to say ALL languages because I haven’t done a survey of all but it makes sense that it should be so. I would still read the docs carefully for whatever new language I was going to try.

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

Sidebar

Related Questions

Does this code work across all standard compliant C++ compilers (it works with g++)?
The standard specifies (23.4.4.2:5, etc.) that constructing all four ordered associative containers ( map
I know that COM provides reusability at the binary level across languages and applications.
EDIT: My question was originally Is there a standard name for a function that
Recently I came across the following snippet, which is an attempt to ensure all
Has anyone come across a fully customizable (compatible with all standard LnF), fast file
So, poking through the n869 draft of the C99 standard I stumbled across this
I notice the standard regex syntax for matching across multiple lines is to use
In the process of making an old webpage standard compliant, the validator came across
Standard Fancybox places an overlay on the entire body. Is there a way 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.