• Strong variable typing in xharbour commercial version

    From Gary Williams@21:1/5 to All on Thu Sep 7 14:34:18 2023
    Was this feature ever enabled in the commercial version ?

    // example
    LOCAL Var1 AS CHARACTER
    Var1 := 3

    seems to compile and run without issue

    Any documentation ?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan@21:1/5 to All on Fri Sep 8 19:14:12 2023
    Il 07/09/2023 23:34, Gary Williams ha scritto:
    Was this feature ever enabled in the commercial version ?

    // example
    LOCAL Var1 AS CHARACTER
    Var1 := 3

    seems to compile and run without issue

    Any documentation ?

    There is no strong typing in xBase, And with := you set a variable anew.
    If you try Var1 = 3 you should get an error I think

    Dan

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Pinkas@21:1/5 to Gary Williams on Fri Sep 8 16:16:10 2023
    On Thursday, September 7, 2023 at 4:34:20 PM UTC-5, Gary Williams wrote:
    Was this feature ever enabled in the commercial version ?

    // example
    LOCAL Var1 AS CHARACTER
    Var1 := 3

    seems to compile and run without issue

    Any documentation ?
    Hi Gary,

    The commercial version was always exactly IDENTICAl to the .org - the only difference was the builtin C compiler.

    In terms of tying, I wrote this so long ago I don't recall the status exactly but IIRC you have to enable HIGHER WARNING level to enable Compile Time warning for static type conflicts.

    Ron

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sat Sep 9 09:40:16 2023
    Il 09/09/2023 01:16, Ron Pinkas ha scritto:

    In terms of tying, I wrote this so long ago I don't recall the status exactly but IIRC you have to enable HIGHER WARNING level to enable Compile Time warning for static type conflicts.

    I tried with -w3 and got no warning. I suppose type checking is disabled.

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gary Williams@21:1/5 to Enrico Maria Giordano on Sat Sep 9 09:12:18 2023
    On Saturday, September 9, 2023 at 3:40:19 AM UTC-4, Enrico Maria Giordano wrote:
    Il 09/09/2023 01:16, Ron Pinkas ha scritto:

    In terms of tying, I wrote this so long ago I don't recall the status exactly but IIRC you have to enable HIGHER WARNING level to enable Compile Time warning for static type conflicts.
    I tried with -w3 and got no warning. I suppose type checking is disabled.

    Looking through what Ron uploaded, it seems it has to be enabled and wasn't.
    I had forgotten the W3 level, it always threw warnings a variable was not in use, when it clearly was,
    finally threw a Q&D checker together for that. There was a commercial Lint checker around the turn of the century,
    anybody know a replacement?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sat Sep 9 21:02:37 2023
    Il 09/09/2023 18:12, Gary Williams ha scritto:

    I had forgotten the W3 level, it always threw warnings a variable was not in use, when it clearly was,

    I've used -W3 since the beginning and never found any problem. I could
    not use any lower warning level.

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gary Williams@21:1/5 to Enrico Maria Giordano on Sat Sep 9 18:23:53 2023
    On Saturday, September 9, 2023 at 3:40:19 AM UTC-4, Enrico Maria Giordano wrote:

    I tried with -w3 and got no warning. I suppose type checking is disabled.

    More testing, seems MiniGUI version is compiled with support, but its a run-time error
    as compared to the expected compile-time error.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Pinkas@21:1/5 to Enrico Maria Giordano on Sat Sep 9 18:24:07 2023
    On Saturday, September 9, 2023 at 2:40:19 AM UTC-5, Enrico Maria Giordano wrote:
    Il 09/09/2023 01:16, Ron Pinkas ha scritto:

    In terms of tying, I wrote this so long ago I don't recall the status exactly but IIRC you have to enable HIGHER WARNING level to enable Compile Time warning for static type conflicts.
    I tried with -w3 and got no warning. I suppose type checking is disabled.

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    I just checked the sources, and apparently xHarbour has to be compiled with HB_COMP_STRONG_TYPES defined to enable and then W3 or greater.

    Ron

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gary Williams@21:1/5 to All on Sat Sep 9 18:49:00 2023
    I just checked the sources, and apparently xHarbour has to be compiled with HB_COMP_STRONG_TYPES defined to enable and then W3 or greater.

    Ron
    Thanks for checking Ron,

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sun Sep 10 09:44:49 2023
    Il 10/09/2023 03:24, Ron Pinkas ha scritto:

    I just checked the sources, and apparently xHarbour has to be compiled with HB_COMP_STRONG_TYPES defined to enable

    Ok, thank you. I prefer not to enable it in the official distribution.

    and then W3 or greater.

    Greater? I was not aware there are greater warning levels! I tried -w4
    with my programs and found no new warnings. The level -w5 is not
    accepted, -w4 seems to be the higher warning level. What is the
    difference between -w3 and -w4?

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Pinkas@21:1/5 to Enrico Maria Giordano on Sun Sep 10 07:46:08 2023
    On Sunday, September 10, 2023 at 2:44:50 AM UTC-5, Enrico Maria Giordano wrote:
    Il 10/09/2023 03:24, Ron Pinkas ha scritto:

    I just checked the sources, and apparently xHarbour has to be compiled with HB_COMP_STRONG_TYPES defined to enable
    Ok, thank you. I prefer not to enable it in the official distribution.

    Yes, I agree - it was strongly coupled with specific PCODE and AFAICT it was not maintained and might not be up to date.

    Ron

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sun Sep 10 16:47:32 2023
    Il 10/09/2023 16:43, Ron Pinkas ha scritto:

    Sadly I no longer remember, but if exists it is likely related to the AdaptiveType/StrongType.

    Ok, thank you. Ron, can you give me write access to the GitHub
    repository, please?

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Pinkas@21:1/5 to Enrico Maria Giordano on Sun Sep 10 07:43:14 2023
    On Sunday, September 10, 2023 at 2:44:50 AM UTC-5, Enrico Maria Giordano wrote:
    Il 10/09/2023 03:24, Ron Pinkas ha scritto:

    I just checked the sources, and apparently xHarbour has to be compiled with HB_COMP_STRONG_TYPES defined to enable
    Ok, thank you. I prefer not to enable it in the official distribution.
    and then W3 or greater.
    Greater? I was not aware there are greater warning levels! I tried -w4
    with my programs and found no new warnings. The level -w5 is not
    accepted, -w4 seems to be the higher warning level. What is the
    difference between -w3 and -w4?
    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    Sadly I no longer remember, but if exists it is likely related to the AdaptiveType/StrongType.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Pinkas@21:1/5 to Enrico Maria Giordano on Sun Sep 10 08:12:20 2023
    On Sunday, September 10, 2023 at 9:47:33 AM UTC-5, Enrico Maria Giordano wrote:
    Il 10/09/2023 16:43, Ron Pinkas ha scritto:

    Sadly I no longer remember, but if exists it is likely related to the AdaptiveType/StrongType.

    Ok, thank you. Ron, can you give me write access to the GitHub
    repository, please?

    Done.

    FWIW, Here is the current list of ALL Warnings, and their respective level from hbgenerr.c:

    const char * hb_comp_szWarnings[] =
    {
    "1Ambiguous reference: \'%s\'",
    "1Ambiguous reference, assuming memvar: \'%s\'",
    "2Variable: \'%s\' declared but not used in function: \'%s\'",
    "2Codeblock parameter: \'%s\' declared but not used in function: \'%s\'",
    "1RETURN statement with no return value in function",
    "1Procedure returns value",
    "1Function \'%s\' does not end with RETURN statement",
    "3Incompatible type in assignment to: \'%s\' expected: \'%s\'",
    "3Incompatible operand type: \'%s\' expected: \'%s\'",
    "3Incompatible operand types: \'%s\' and: \'%s\'",
    "4Suspicious type in assignment to: \'%s\' expected: \'%s\'",
    "4Suspicious operand type: \'unknown\' expected: \'%s\'",
    "3Can\'t use array index with non-array",
    "3Incompatible return type: \'%s\' expected: \'%s\'",
    "4Suspicious return type: \'%s\' expected: \'%s\'",
    "3Invalid number of parameters: %s expected: %s",
    "3Incompatible parameter: %s expected: \'%s\'",
    "4Suspicious parameter: %s expected: \'%s\'",
    "3Duplicate declaration of %s \'%s\'",
    "3Function \'%s\' conflicting with its declaration",
    "3Variable \'%s\' used but never initialized",
    "3Value of Variable \'%s\' never used",
    "3Incompatible type in assignment to declared array element expected: \'%s\'",
    "4Suspicious type in assignment to declared array element expected: \'%s\'",
    "3Class \'%s\' not known in declaration of \'%s\'",
    "3Message \'%s\' not known in class \'%s\'",
    "0Meaningless use of expression: \'%s\'",
    "2Unreachable code",
    "1Redundant \'ANNOUNCE %s\' statement ignored",
    "1STATIC Function \'%s\' defined but never used",
    "1Variable \'%s\' is a reserved word",
    "3Variable '%s' is assigned but not used in function '%s'",
    "3Variable '%s' is never assigned in function '%s'"
    };

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sun Sep 10 17:12:26 2023
    Il 10/09/2023 16:47, Enrico Maria Giordano ha scritto:

    Ron, can you give me write access to the GitHub
    repository, please?

    Thank you! :-)

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Pinkas@21:1/5 to Enrico Maria Giordano on Sun Sep 10 08:57:12 2023
    On Sunday, September 10, 2023 at 10:12:28 AM UTC-5, Enrico Maria Giordano wrote:
    Il 10/09/2023 16:47, Enrico Maria Giordano ha scritto:

    Ron, can you give me write access to the GitHub
    repository, please?
    Thank you! :-)
    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg
    I just created an xharbour-org (xHarbour.org) organization on GitHub, transferred the xHarbour repo to xHarbour.org, and gave your ownership role so you can continue as Admin.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sun Sep 10 17:15:28 2023
    Il 10/09/2023 17:12, Ron Pinkas ha scritto:

    FWIW, Here is the current list of ALL Warnings, and their respective level from hbgenerr.c:

    const char * hb_comp_szWarnings[] =

    Very interesting, thank you!

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sun Sep 10 18:09:12 2023
    Il 10/09/2023 17:57, Ron Pinkas ha scritto:

    I just created an xharbour-org (xHarbour.org) organization on GitHub, transferred the xHarbour repo to xHarbour.org, and gave your ownership role so you can continue as Admin.

    Ok, I don't know what it exactly means but thank you! :-)

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Pinkas@21:1/5 to Enrico Maria Giordano on Sun Sep 10 09:12:19 2023
    On Sunday, September 10, 2023 at 11:09:13 AM UTC-5, Enrico Maria Giordano wrote:
    Il 10/09/2023 17:57, Ron Pinkas ha scritto:

    I just created an xharbour-org (xHarbour.org) organization on GitHub, transferred the xHarbour repo to xHarbour.org, and gave your ownership role so you can continue as Admin.
    Ok, I don't know what it exactly means but thank you! :-)

    Means you now can give write access yourself. Since you have been the person that maintained the project for last years it seems natural that you continue.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sun Sep 10 19:52:50 2023
    Il 10/09/2023 18:12, Ron Pinkas ha scritto:

    Means you now can give write access yourself. Since you have been the person that maintained the project for last years it seems natural that you continue.

    Thank you!

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)