Page 2 of 2

Re: Set a specific starting function

PostPosted: Mon Jul 31, 2023 9:46 pm
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.

Re: Set a specific starting function

PostPosted: Tue Aug 01, 2023 11:13 am
by Enrico Maria Giordano
What do you think about something like this?

Code: Select all  Expand view
IF TYPE( "MAIN()" ) = "UI"
    MAIN()
    QUIT
ENDIF

Re: Set a specific starting function

PostPosted: Sun Aug 06, 2023 2:04 pm
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

Re: Set a specific starting function

PostPosted: Sun Aug 06, 2023 2:12 pm
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 view
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.

Re: Set a specific starting function

PostPosted: Mon Aug 07, 2023 5:51 am
by Antonio Linares
Dear Enrico,

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

Re: Set a specific starting function

PostPosted: Mon Aug 07, 2023 7:35 am
by Enrico Maria Giordano
I'm not going to use it for now but I keep it for the future. Thank you.