Originally built a program using FF 3.60 and complied under PBWin9 (with JR includes), on Win XP Pro SP3.
Now I'm doing a very minor coding change, but am using FF 3.61, PBWin10 (with JR Includes), on Win 7 Home (64bit).
I had to change a few things due to improvements in the JR headings, but the strange thing is how FF found an error on a line that had compiled fine before...
Originally, this macro was defined in FF_Appstart, but is now in an INCLUDE file:
Macro mMyAppData() = GetSpecialFolderLocation(%CSIDL_APPDATA)
In FF_WINMAIN, I had this conditional:
If gINI_File <> mMyAppData() & "\" & Desired_IniFile Then
Originally, it compiled just fine. But in the new environment it threw an error, telling me that I was missing "THEN". Obviously this was not true, so FF/PBWin was confused about something, probably earlier on the line.
By breaking the line into "smaller" statements and temporary variables, I found the problem: the empty parens at the end of the macro call. By dropping them, the original line compiled just fine in the new environment.
If gINI_File <> mMyAppData & "\" & Desired_IniFile Then
So my question is: who changed what, and why? I'm not on a witch hunt, just wanting to know the principle behind it, so that I can recognize other appearances of this change when I hit them.
Thanks,
-John
Seems like PB changed from v9 to v10 in the way they handle macros with empty parenthesis. I tested it on v9 and it does not throw an error. On v10 it gives a syntax error. Maybe the change is documented in one of their readme's.
Thanks Paul,
Good to know it's not FF.
I've checked thru the PB Help and ReadMe files, but found no info on any change, so I've written to PB Support. I'll post again when I have more/better info.
-John
> I've written to PB Support
Unneeded. Just remove parens with macros that don't have parameters.
Thanks, Jose, I understand that's how to do it correctly, now in PB10.
I wrote to PB because there's been a change in compiler behavior from PB9 to PB10, but the PB Help file doesn't mention it, and it should.
-John
They have used macros for too many things. I guess that the change was when support for unicode was implemented and a change was made to use macros to define aliases to functions without having to list the parameters.