Creating a plugin with overloaded functions

I’m creating a plugin with several overloaded methods. Unfortunately the documentation and examples are lacking in this area, and my numerous guesses have not been able to figure it out.

Code from my plugin:

REALmethodDefinition theMethods[] = {
    { (REALproc)Noise, REALnoImplementation, "Noise(x as Double) as Double", REALconsoleSafe},
    { (REALproc)Noise, REALnoImplementation, "Noise(x as Double, y as Double) as Double", REALconsoleSafe},
    { (REALproc)Noise, REALnoImplementation, "Noise(x as Double, y as Double, z as Double) as Double", REALconsoleSafe},
//some other functions 
};

This code produces the error “Address of overloaded function ‘Noise’ does not match required type ‘void ()’” at each (REALproc)Noise.

The noise functions are declared like this in my plugin:

static double Noise(double);
static double Noise(double,double);
static double Noise(double,double,double);

What would be the correct REALproc function in the REALmethodDefinition so that everything will compile and work as expected? Thanks

Thanks Jean-Paul – that’s a good work around. I was too focused on the idea that it should be possible to use overloaded methods. Do you (or anyone) know if it is possible to use overloaded methods in the REALmethodDefinition or if this is the only way?

The functions you register must have unique names, so give them different names.
But the declaration can overload like you do above with using same names for Xojo.