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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:25:25+00:00 2026-06-11T07:25:25+00:00

I am working on a backward compatibility project and so, I need to re-define

  • 0

I am working on a backward compatibility project and so, I need to re-define things without messing with old code. I want to use the output as one of the params in a #define.
For example : my old code contains

#define OPERATION(y) ...

and we used it

x = OPERATION(y);

in the new code we have:

#define OPERATION_NEW(y,x) ... 

and we use it like:

x = OPERATION_NEW(y,x);

notice that now x is a result and a param.

I want to be able to do the next:

#define OPERATION(y) OPERATION_NEW(y,__output__)

(I want to be able to get the output as a param and use it in the define…)

is it possible ? and if so, how ? if not , is there a solution for this situation ? I have tones of old code that have the OPERATION(y) and want to re-direct it to OPERATION_NEW(y,x) -while keeping in mind that x must be the output…

  • 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-11T07:25:27+00:00Added an answer on June 11, 2026 at 7:25 am

    Not really. There’s no such thing as an “output” for a macro. In this particular case, OPERATION(y) is a macro which expands to an expression. That expression is subsequently assigned to x.

    But the preprocessor handles just the macro, not the assignment. It doesn’t know or care about the previous token. The compiler only sees the assignment and the expressions on both sides, not the macro. Neither has a complete picture.

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

Sidebar

Related Questions

Ok, I'm new to JavaScript and need some help here. Working on forward/backward buttons
I'm working on a client-server application (.NET 4, WCF) that must support backwards compatibility.
Working on the problems on Project Euler to try to learn Clojure. I'm on
The project I'm working on creates a local copy of the SQL Server database
I have been working in straight line: A---B---C---D---E---F (master:HEAD) Now I want to move
I'm working on a C++ library and was wondering about compatibility within it's own
I am working on porting a Java codebase to Cocoa/Objective-C for use on desktop
In Java people often define an interface together with a class and use interface
I'm trying to get a railscasts working but apparently things have changed a lot
I am working on a little HTML/JavaScript/CSS3 project for fun. I'm basically trying to

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.