Minor adjustments: warnings "... not declared or declaration mismatch in class ..."

83 views
Skip to first unread message

Hurricane

unread,
Mar 10, 2026, 2:33:45 PM (5 days ago) Mar 10
to Harbour Users
Hi Przemek,
I made two adjustments, let me know if I can send it to you for your review/update in Harbour.


HB_CLS_PARAMS_ERR - Show warnings ".. not declared or declaration mismatch in class ..." for any level /W 
  • When defined in the .prg file or in the build script, it will activate these warnings (currently, it's only for /W3 builds).
  • It maintains compatibility with the current usage mode.

HBMK2 test /W -DHB_CLS_PARAMS_ERR

test.prg(34) Warning W0001  Method <OPEN( cFileName, nMode )> not declared or declaration mismatch in class <TTest>
test.prg(38) Warning W0001  Method <CLOSE()> not declared or declaration mismatch in class <TTest>  

-----------
  • We cannot always use W3, whether for application or technical strategy reasons.
  • Code editor/IDE assistants (VSCode/xEdit...) help us with parameters (using dynamic or static dictionaries), but when there are differences, it leads to errors, generating RTEs and wasted debugging time.
  • Essential for any vendor that creates and distributes libraries (xailer, fivewin, etc.) and, subsequently, users who will use these libraries and editors with code assistant.


RESERVED: scope for methods and properties

  • The same as EXPORTED: When we have to declare (methods/properties) with public scope, it indicates that their use is restricted/internal, improving code readability.

To use the original Harbour files with these features in my builds, I did it differently.

Regards,
Hurricane
Reply all
Reply to author
Forward
0 new messages