Welcome Guest. Please Login or Register. Apr 1st, 2018, 03:48am
ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018. We apologize Conforums does not have any export functions to migrate data. Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.
Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
Re: Variables in MAINWIN statement
« Reply #3 on: Aug 9th, 2017, 8:41pm »
Richard
The only hint that MAINWIN is a directive is in the help -
"This statement is usually placed at the beginning of the program code."
In LB the size of the main window is fixed when the program is tokenised. The advantage of LBB is that the size can be dynamically changed during execution.
"This statement is usually placed at the beginning of the program code."
Well, to me that hints at the opposite! If it makes no difference where the MAINWIN statement goes, why recommend that it goes at the beginning? In the case of LBB, however, it does matter that it goes near the beginning, to ensure the wanted size is established as quickly as possible.
Hence the documentation would lead me to expect the LBB behaviour, and in well over five years I've never had any reason to doubt it. Only in experimenting with MAINWIN in a console program did I notice anything unexpected.