Thread overview
DM8.23
Nov 30, 2001
Roland
Nov 30, 2001
Damian
Nov 30, 2001
Walter
November 30, 2001
Not a problem, just for information:

//header

MyClass {
public:
    .
    void useMyFunction(..);
    int myFunction();
    .
};

//-----------------
//CPP

    void MyClass::useMyFunction() {
        .
        if (myFunction) {           //<--------  i forgot to put the
parenthesis after myFunction and it compiles with DM823: is it normal ?
            .
        }
        .
}

I must signal that i just realize that myFunction never uses *this
pointer and could be static.
command line: sc .. -r -mx -o+time -5 -a4 -c ..
    .

Roland
    .

November 30, 2001
Roland,

I suspect the compiler should give an error...

I tried the code on HP's compiler 'aCC' and got the following error:

# Nonstatic member function "int MyClass::myFunction()" is used incorrectly (must be either called or used to form a pointer to member).

Regards,
Damian

Roland wrote:

> Not a problem, just for information:
> 
> //header
> 
> MyClass {
> public:
>     .
>     void useMyFunction(..);
>     int myFunction();
>     .
> };
> 
> //-----------------
> //CPP
> 
>     void MyClass::useMyFunction() {
>         .
>         if (myFunction) {           //<--------  i forgot to put the
> parenthesis after myFunction and it compiles with DM823: is it normal ?
>             .
>         }
>         .
> }
> 
> I must signal that i just realize that myFunction never uses *this
> pointer and could be static.
> command line: sc .. -r -mx -o+time -5 -a4 -c ..
>     .
> 
> Roland
>     .
> 
> 

November 30, 2001
It's interpreted as a pointer to a member function. -Walter

"Roland" <rv@ronetech.com> wrote in message news:3C076D27.3799691F@ronetech.com...
> Not a problem, just for information:
>
> file://header
>
> MyClass {
> public:
>     .
>     void useMyFunction(..);
>     int myFunction();
>     .
> };
>
> file://-----------------
> file://CPP
>
>     void MyClass::useMyFunction() {
>         .
>         if (myFunction) {           file://<--------  i forgot to put the
> parenthesis after myFunction and it compiles with DM823: is it normal ?
>             .
>         }
>         .
> }
>
> I must signal that i just realize that myFunction never uses *this
> pointer and could be static.
> command line: sc .. -r -mx -o+time -5 -a4 -c ..
>     .
>
> Roland
>     .
>