Compiler Error - Clarion 10

When compiler certain applications, I occasionally get the following error:

Expected: PROGRAM PRAGMA - C:\APPLICATION\src<every_module_APPNAME>.clw:2

If I open any of the source modules, the source code is there. The only way I can remedy this is to open the application and double click on every module in the application. I don’t have to do anything other than pop the ‘Procedure Properties’ screen and exit. Is this a known issue? If so, is there a remedy?

Thanks, in advance…

Sometimes weird stuff happens if one or modules is saved with a unicode BOM. Maybe that’s it.

I will look into that. Thanks…

If you might have pasted some code copied from (for example) a web browser, sometimes that could be interpreted as unicode. So the IDE saves it as such.

I discovered that after trying to use a poop emoji as literal text.

When I copy code from a browser now, I pre-screen it by pasting into Ultra Edit then copying that to the clipboard.

Steve, check out this thread Procedure params missing when importing APP into solution from APV
Once you have the parameters values set, either by opening the procedure properties or using @Mark_Sarson’s tool, save the APP to APV and then it should be good from that point forward.
This is related to an issue caused when SV moved the prototype parameter information from a template symbol to an actual part of the module definition.

I have to admit I didn’t update my tool to take care of this problem. I can still make that change. Basically looking for no PARAMETER entry but there is a %ProcedureParameters entry and moving the value from one to the other.

1 Like

Found it… Apparently, way back when, someone wrote an extension template that was still being used throughout the application suite. It contained some compiler directives that were not playing nicely in 10. It’s amazing that I’m in the testing phase of the conversion before this shows up. Gotta love it…

I do appreciate the suggestions on how to track it down. Thank you…