New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
std.ch on first PRG #152
Comments
The example can be further minimised using this #define HB_SYMBOL_UNUSED( symbol ) ( ( symbol ) )
PROCEDURE Main()
RETURN |
Hi,
It's standard Cl*pper behavior reproduced in Harbour.
Below is reduced example.
Because Cl*pper does not support compilation of many .prg
files with single command line call then it's necessary
to use t.clp file and compile the example by
clipper @t /w
(/w is necessary to show the problem during compilation
but it can be seen also suring execution.
In case of Harbour you can compile this example by:
hbmk2 @t.clp -w
or
hbmk2 t1.prg t2.prg -w
best regards,
Przemek
/*** t1.prg ***/
#define _SET_DATEFORMAT 4
FUNCTION MAIN
? Set( _SET_DATEFORMAT )
P()
RETURN Nil
/*** t2.prg ***/
PROC P
? Set( _SET_DATEFORMAT )
RETURN
/*** t.clp ***/
t1.prg
t2.prg
|
Przemek, would you mind describing what this behaviour does? It seems that redefining a standard rule causes that symbol to be undefined in subsequent sources, but that feels strange so I'm assuming the real explanation must be something else. |
On Thu, 20 Apr 2017, Viktor Szakats wrote:
Hi Viktor,
Przemek, would you mind describing what this behaviour does?
It _seems_ that redefining a standard rule causes that symbol
to be undefined in subsequent sources, but that feels strange
so I'm assuming the real explanation must be something else.
Standard rules can be undefined or redefined and in such case
they are removed from prebuild list of standrd rules. When next
independent .prg file is compiled (included by .clp file or
DO <procname> [with ...]' or command line in case of Harbour)
then all user rules are removed also the ones which replaced
standard ones. Cl*pper works in such way and I replicated it
just for compatibility with some really exotic code which may
exploit this behavior.
best regards,
Przemek
|
Thanks Przemek, I didn't know. My conclusion is that it's best not to explicitly #include |
demo.prg
hhtml.prg
https://github.com/vszakats/harbour-core/issues/291
The text was updated successfully, but these errors were encountered: