On Fri, 06 Jun 2008, Alex Strickland wrote:

Hi Alex,

> >   DECLARE [STATIC] FUNCTION <FUNCNAME>[(<FUNCPARAMS,...>)]
> >or:
> >   PROTOTYPE [STATIC] FUNCTION <FUNCNAME>[(<FUNCPARAMS,...>)]
> >This way also resolves the problem with parameters validation
> >and prototyping for strong type checking so in the future we
> >will have support for sth like above for normal .prg code.
> >As a side effect it may resolve also this problem.
> I have read this whole thread and come back to this article. Is this 
> declaration a big job, even if only to allow the declaration and use 
> of C level statics for the moment?

Technically it's not a problem. I can commit working code in half hour.
But I do not know yet the final syntax which will be used for strong
type prototyping. It's possible that I do not see some problems and later
I will have to change it. If I document it now then then people will
expect that it will not change in the future and this may be real problem.
Please note that we already have DECLARE command which is used for some
limited situations and even now it creates problems due to conflict with
DECLARE used as synonym of PRIVATE, f.e.:
   DECLARE v1, v2, v2 AS LOGICAL
is recognized as PRIVATE instead of setting type of v1, v2 and v3 to
LOGICAL. Current syntax forces using AS <type> after each variable what
is not compatible with other xBase languages like FlagShip or VO so it
will have to be changed. It's not even compatible with some other
declarations supported by Clipper and [x]Harbour. Look at this code:

   proc main()
      field F1, F2, F3 IN T1
      ? f1, f2, f3
   return

each field F1, F2, F3 belongs to T1 alias. The same should be for:

      local L1, L2, L3 AS NUMERIC

each local variable L1, L2 and L3 should be declared as NUMERIC.
But it isn't for current code and only L3 is.
I want to remove all this grammar rules and create new ones which
will address the whole strong typing and class declaration area
to later not fight with problems like in:

   proc main()
      field F1, F2, F3 IN T1, F4, F5, F6 IN T2
      ? f1, f2, f3, f4, f5, f6
   return

Harbour does not compile it but test it in xHarbour with -gc2
option and check aliasing in final C code.

In summary it can be easy done but I do not want to add anything
as long as I will not resolve whole or nearly whole problem in
my head ;-) and for this I need much more time.

best regards,
Przemek
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to