Set a specific starting function

User avatar
Enrico Maria Giordano
Posts: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Set a specific starting function

Post by Enrico Maria Giordano »

Enrico Maria Giordano wrote:
Antonio Linares wrote:It should work fine, please try it :-)

It is just one more stack call
Ok, I'll try, thank you.
It seems to work fine. I have to test it thoroughly. Thank you.
User avatar
Enrico Maria Giordano
Posts: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Set a specific starting function

Post by Enrico Maria Giordano »

What do you think about something like this?

Code: Select all | Expand

IF TYPE( "MAIN()" ) = "UI"
    MAIN()
    QUIT
ENDIF
User avatar
Detlef
Posts: 209
Joined: Mon Feb 07, 2022 9:54 pm

Re: Set a specific starting function

Post by Detlef »

Sorry, Enrico,
I forgot to answer you.

For 'INIT PROCEDURE' there is good documentation in the xHarbour Language Reference Guide.chm.
Also an example under 'EXIT PROCEDURE'.

Regards, Detlef
User avatar
Enrico Maria Giordano
Posts: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Set a specific starting function

Post by Enrico Maria Giordano »

I don't understand your message, sorry. I already proposed (in my previous message) the following code at the end the INIT function:

Code: Select all | Expand

IF TYPE( "MAIN()" ) = "UI"
    MAIN()
    QUIT
ENDIF
Works fine for me. I would only like to know your thoughts about it. If there is not a public function called MAIN the code behavior is the usual one. Otherwise the function MAIN is run and, at the end, a QUIT allows the program to exit.
User avatar
Antonio Linares
Site Admin
Posts: 42270
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Set a specific starting function

Post by Antonio Linares »

Dear Enrico,

If it works fine for you then use it and lets wait to see if there are any issues
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Set a specific starting function

Post by Enrico Maria Giordano »

I'm not going to use it for now but I keep it for the future. Thank you.
Post Reply