extern function with definition

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

extern function with definition

Ben Coman
 

Here is something I don't comprehend, a function declared extern but also with its definition provided.  Is there anything strange about that arrangement?

extern int sqAskSecurityYesNoQuestion(const char *question)
{
    return MessageBoxA(stWindow, question, "Squeak Security Alert", MB_YESNO | MB_ICONSTOP) == IDYES;
}
Reply | Threaded
Open this post in threaded view
|

Re: extern function with definition

Nicolas Cellier
 

Le sam. 5 janv. 2019 à 08:39, Ben Coman <[hidden email]> a écrit :
 

Here is something I don't comprehend, a function declared extern but also with its definition provided.  Is there anything strange about that arrangement?

extern int sqAskSecurityYesNoQuestion(const char *question)
{
    return MessageBoxA(stWindow, question, "Squeak Security Alert", MB_YESNO | MB_ICONSTOP) == IDYES;
}
Reply | Threaded
Open this post in threaded view
|

Re: extern function with definition

Ben Coman
 
got it, thx Nicolas.

On Sat, 5 Jan 2019 at 18:54, Nicolas Cellier <[hidden email]> wrote:
 
Le sam. 5 janv. 2019 à 08:39, Ben Coman <[hidden email]> a écrit :
 

Here is something I don't comprehend, a function declared extern but also with its definition provided.  Is there anything strange about that arrangement?

extern int sqAskSecurityYesNoQuestion(const char *question)
{
    return MessageBoxA(stWindow, question, "Squeak Security Alert", MB_YESNO | MB_ICONSTOP) == IDYES;
}