[DGD]defined path

Geir Harald Hansen geirhans at ifi.uio.no
Fri Mar 24 12:24:26 CET 2000


On Fri, Mar 24, 2000 at 10:43:12AM +0100, birgit.schulte at philips.com wrote:
> # define MyObject PathA+"/myobject"
>[snip] 
> MyObject->some_function(some_variable);

This is the same as:

PathA + "/myobject"->some_function(some_variable);

and naturally results in an error.

> (MyObject)->some_function(some_variable);
> it works...

I would suggest using:

# define MyObject (PathA + "/myobject")

It is common to use parentheses like this with defines, to avoid
strange results from precedence rules. (-> binds stronger than +)

- Geir

List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list