|
Posted by Tim Roberts on 10/21/07 04:11
Jerry Stuckle <jstucklex@attglobal.net> wrote:
>Tim Roberts wrote:
>>
>> You missed the point. ...
>> PHP's rules are different. Not better, not worse. Just different.
>
>No, you missed the point.
>
>Compilation is not the same as execution. When PHP is executed, it's
>include statement works just alike any file operation in C/C++ when that
>program is executed.
>
>Just because they are both "include" statements does not mean they are
>the same. In PHP they are executed. In C/C++ they are handled by the
>preprocessor. Completely different environment with completely
>different results.
Nonsense. The distinction between compilation and interpolation is
entirely artificial. PHP can be compiled, just as C can be interpreted.
We're talking about source files including other source files. The concept
is the same. PHP has different rules from C. It's just that simple, and I
don't know why you want to make it more complicated.
>And you are incorrect. In C/C++, include files are relative to the list
>of directories in the -I (INCLUDE) compiler option (which can also be
>specified in some IDE's). And you can use absolute paths in #include
>statements.
I never denied that. However, I am NOT incorrect. The first place C and
C++ look for an "included" file is in the directory of the file currently
being scanned. If not found there, only then does the preprocessor move on
to the -I list.
If the #include uses angle brackets (i.e. <stdio.h>), THEN the current
directory is skipped and it goes straight to the -I path.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
Navigation:
[Reply to this message]
|