Dear both,
Thank you for your quick comments.
Mecej4 - yep, I know what PAUSE should do, but I'd never thought about how it does it. This is not a console app, but a WINAPP. Although the PAUSE statements are there, they are not invoked. I suppose we should try invoking them, to see what happens. The PAUSE statements all have messages.
The input data file is read, and the program (not my style) then goes on to open a dialog. At that point, the program gives the ClearWin+ error message that there are too many %ca format codes. I have checked everything, and there is definitely no attempt to issue a WINIO@ function call with or without %ca before the line containing %ca that is referred to in the error window.
Paul, my apologies for using a shorthand. The program is a considerable way through (re-)development into a fully-fledged ClearWin+ Windows program,. My shorthand File/New means the New option in a File menu, following which the data values are laboriously entered one by one via a series of dialogs that can be invoked by options on the menu bar; File/Open means an Open option in the File menu that opens a file and reads the contents. Once the dataset is read, the dialogs are launched one by one so that the user inspects and accepts or changes the data values.
If there had been a formatting error in the datafile, then there should have been a message to that effect. If the dataset was inadequate in some way, or not to the specification required by the program, then one of the PAUSE statements left in from the DOS/console incarnation should have been invoked. There does not seem to be anything that I can immediately associate with the execution of one of the PAUSE statements that I can see. The error comes after the file has been read and validated and when there is an attempt to open one of the dialogs.
The line numbers in the ordinary FTN95 error box gives the line number for the error, which is the %ca invocation for the relevant first dialog and the line number of the END statement in the main program routine (not the call for the dialog box but we can infer that from various trials, as the dialog box starts OK as a callback function if invoked from the menu bar, but not as here from a function call immediately following reading in the file. I therefore don't think that /DEBUG is actually helpful in the present situation.
My pal is replacing the PAUSE statements at the moment, and I will report back if that solves the problem, then try to write a demonstrator.
Given that PAUSE is a deleted feature from way back in the 20th century (!) I should hardly be surprised if it works in a console app with FTN95 but has side effects in a WINAPP - side effects that no-one reported before, because no-one normally considers having PAUSE statements (possibly).
You will get a grovelling apology from me if it transpires that it is simply a coding error that I haven't picked up on! (But I have looked very hard). Compilation is 32bit, and no optimisation.
A belated Happy New Year, by the way,
Eddie