POV-Ray : Newsgroups : povray.off-topic : Unix shell : Re: Unix shell Server Time
3 Sep 2024 23:26:07 EDT (-0400)
  Re: Unix shell  
From: Darren New
Date: 31 Jan 2011 15:58:18
Message: <4d47226a$1@news.povray.org>
Warp wrote:
>> No. The programming language is such that it is impossible to figure out by 
>> looking at the source code what the dependencies are on other source code. 
> 
>   If that were true, then it would be impossible to compile the program.
> After all, it's impossible for the compiler to figure out which files are
> being included just by looking at the source code.
> 
>   I suppose compilers do it by magic, then.

Here are three C source files. Please compile them and tell me what it 
prints. Or do you think this code is impossible to compile? Or do you admit 
that it's impossible to figure out by looking at the source code what the 
dependencies are on other source code?

/tmp/main.c:

#include "xyz.h"
#include <stdio.h>
int main()
{ printf("Answer=%s\n", ANSWER); return 0; }


/tmp/one/xyz.h:

#define ANSWER "Hello"

/tmp/two/xyz.h:

#define ANSWER "World"




-- 
Darren New, San Diego CA, USA (PST)
  "How did he die?"   "He got shot in the hand."
     "That was fatal?"
          "He was holding a live grenade at the time."


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.