Paul, sorry for the confusion.
Your code works in Plato or not in Plato. Mine will simply not work.
I am not using Plato to build my code, just a MAKE file to compile and link. Using all standard utilities (FTN95, SLINK, etc.).
My compile template is:
/DUMP /UNLIMITED_ERRORS /PERSIST /no_quit /list $(basename $@).lis /list_insert_files /ignore 242 /ignore 767 /ignore 520 /ignore 21 /ignore 179 /ignore 1031 /ignore 197 /ignore 1225 /ERROR_NUMBERS /persist /SAVE /FPP /CFPP /no_quit /wide_source /implicit_none
The link steps vary, but generally look like this:
$(LINKER) /heap:12000000,6000000 /stack:9600000,4800000 $(DESTINATION)\CMAIN.obj $(DESTINATION)\CFUNC\GUSER.obj $(LIBRARY_CMASTER) $(PROJ4LIB) \((PDFSUPPORT) -file:\)(C_MASTER) -MAP:$(DESTINATION)\C-Master.MAP
I don't specifically call out linking the FTN95 libraries because that was not in the original template I lifted from using Plato in the early days.
The stack/heap values were selected because at some point, the combination of my code and what was being used by FTN95 for window creation (i.e. %lv) was causing a crash. I think this may no longer be necessary, but am unsure.
When I rebuilt Windows 10 Pro to 'fix' the problem with creating a folder via browse_for_folder1(), I built it totally clean, formatting my boot drive before re-installing. I don't know if this is a factor or not for this current issue. It did fix the browse issue completely.
I ran the full compile on the laptop, and my larger code would not work. I ran your sample code there (un-recompiled) and it worked.
I hope this explanation helps. I am happy to try anything!