Set a specific starting function

Re: Set a specific starting function

Postby Enrico Maria Giordano » Mon Jul 31, 2023 9:46 pm

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: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Set a specific starting function

Postby Enrico Maria Giordano » Tue Aug 01, 2023 11:13 am

What do you think about something like this?

Code: Select all  Expand view
IF TYPE( "MAIN()" ) = "UI"
    MAIN()
    QUIT
ENDIF
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Set a specific starting function

Postby Detlef » Sun Aug 06, 2023 2:04 pm

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
Detlef
 
Posts: 209
Joined: Mon Feb 07, 2022 9:54 pm

Re: Set a specific starting function

Postby Enrico Maria Giordano » Sun Aug 06, 2023 2:12 pm

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.
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Set a specific starting function

Postby Antonio Linares » Mon Aug 07, 2023 5:51 am

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
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Set a specific starting function

Postby Enrico Maria Giordano » Mon Aug 07, 2023 7:35 am

I'm not going to use it for now but I keep it for the future. Thank you.
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 51 guests

cron