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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:25:33+00:00 2026-05-11T18:25:33+00:00

I was looking at the program at http://www0.us.ioccc.org/1988/westley.c , mentioned in another SO answer

  • 0

I was looking at the program at http://www0.us.ioccc.org/1988/westley.c, mentioned in another SO answer – it’s supposed to print the value of pi, about 3.142, but when I compile it and run it I get 0.250. It looks like when the GCC preprocessor (both 4.1.2 and 3.4.6 tested) runs on the code, it converts

#define _ -F<00||--F-OO--;
_-_-_

to

-F<00||--F-OO--;- -F<00||--F-OO--;- -F<00||--F-OO--;

but I think, for the program to work, it should be

-F<00||--F-OO--;--F<00||--F-OO--;--F<00||--F-OO--;

i.e. GCC is inserting an extra space before the “macro” expansion. Is that the way #define is supposed to work? (Has that changed since 1988?)

EDIT: Also, any information about how to prevent those spaces from showing up would be appreciated.

  • 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-11T18:25:33+00:00Added an answer on May 11, 2026 at 6:25 pm

    The preprocessor operates on tokens, not strictly text. So technically it doesn’t “put a space” in between, but unless you explicitly tell it to paste two tokens together with the ## operator, it won’t do it. In this case the two -‘s across macro lines are counted as two different tokens – both meaning unary minus, not decrement.

    see also: http://en.wikipedia.org/wiki/C_preprocessor#Token_concatenation

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

Sidebar

Related Questions

I was looking at this site: http://rosettacode.org/wiki/Fibonacci_sequence#JavaScript and saw this program: function fib(n) {
(SquashFS is a compressed filesystem - http://en.wikipedia.org/wiki/SquashFS ) I'm looking for a way to
I'm looking http://docs.python.org/library/socketserver.html to try and handle asynchronous requests with the socketserver in python.
I'm looking for a way to draw directed graphs in PHP. (as in http://upload.wikimedia.org/wikipedia/commons/0/08/Directed_acyclic_graph.png
I'm looking at http://akuma.kohsuke.org/ , but it's only for POSIX systems. I don't need
I'm looking to use GL_OES_get_program on Android using the Android SDK (not native). http://www.khronos.org/registry/gles/extensions/OES/OES_get_program_binary.txt
I am looking for a way to scrape the data from this website: http://www.dectech.org/football/index.php
I'm looking for a program to batch decompile Java classes. I found JAD, but
I'm looking for a program or library that I could use for experimenting with
I'm looking for a program to create window transparency within Windows XP; somewhat like

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.