Re: [harbour-users] CLASS / DATA, VAR... REQUIRED (New feature)

119 views
Skip to first unread message

Francesco Perillo

unread,
Feb 13, 2025, 2:50:14 PM2/13/25
to harbou...@googlegroups.com, harbou...@googlegroups.com

Harbour is a dynamic non typed language and has constructs as ... or pcount() OR HB_APARAMS() (if i remember correctly) so it would be a bit strange to add the feature you request...

Btw, it would be a great addition! But it would be another language...


Il Gio 13 Feb 2025, 20:24 'Hurricane' via Harbour Users <harbou...@googlegroups.com> ha scritto:
A suggestion, could someone add this feature to Harbour?!
syntax (hbclass.ch) and scope (HB_OO_CLSTP_REQUIRED)

This small change will help the class creator to automate this type of validation at strategic points.

CLASS TTest
   DATA cKey      INIT ''              REQUIRED
   DATA cModel    INIT '...ai_name...' REQUIRED
   DATA cURL                           REQUIRED
   ...
ENDCLASS

Once I'm done, I can share the code.



Changing the subject a little...
Is it possible to enable parameter checking for a method? The compiler will warn you when the implementation is different from the declaration.
I did some tests and I couldn't

CLASS TTest
   METHOD send( cURL )
ENDCLASS

METHOD send( cURL, xData ) CLASS TTest
   RETURN NIL

Regards,
Hurricane

--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/530722945.12289521.1739474639408%40mail.yahoo.com.

Hurricane

unread,
Feb 13, 2025, 4:52:25 PM2/13/25
to harbou...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages