Welcome, Guest
Username: Password: Remember me
Qui si parla italiano
  • Page:
  • 1

TOPIC:

SUM: errore compilatore 06 Jan 2023 20:08 #24940

  • Gfb22
  • Gfb22's Avatar
  • Topic Author


  • Posts: 52
  • Nella mia ultima app utilizzo in diverse occasioni il comando SUM.In tre occasioni il compilatore mi da gli errori che allego.


    Di seguito il codice che da errore:
    SUM Tabella->T_IMPORTE TO fAA ;
    	WHILE Tabella->T_DATA < AnnoStart ;
    	FOR (Tabella->T_CATEG == "45"  .or. Tabella->T_CATEG == "46"  .or. Tabella->T_CATEG == "50"  .or. Tabella->T_CATEG == "70")
    ..e la line 403 del comando SUM:
    #command SUM  [<x1> [, <xn>]  TO  <v1> [, <vn>] ]                       ;
             [FOR <lfor>]                                                   ;
             [WHILE <lwhile>]                                               ;
             [NEXT <nnext>]                                                 ;
             [RECORD <rec>]                                                 ;
             [<rest:REST>]                                                  ;
             [<noopt: NOOPTIMIZE>]                                          ;
             [ALL]                                                          ;
                                                                            ;
          => <v1> := [ <vn> := ] 0                                          ;==> line 403
           ; DbEval(                                                        ;
                   {|| <v1> += <x1> [, <vn> += <xn> ]},                     ;
                   <{lfor}>, <{lwhile}>, <nnext>, <rec>, <.rest.>, <.noopt.>;
                   )
    Come risolvere?
    Grazie!
    Attachments:

    Please Log in or Create an account to join the conversation.

    SUM: errore compilatore 07 Jan 2023 00:09 #24941

    • Chris
    • Chris's Avatar


  • Posts: 3982
  • Hi GIanluca,

    This looks like a preprocessor bug. Will log a report about it, in the meantime, please try adding the following in the beginning of your prg, does it work ok now?

    #command SUM  <x1> [, <xn>]  TO  <v1> [, <vn>]                          ;
             [FOR <lfor>]                                                   ;
             [WHILE <lwhile>]                                               ;
             [NEXT <nnext>]                                                 ;
             [RECORD <rec>]                                                 ;
             [<rest:REST>]                                                  ;
             [<noopt: NOOPTIMIZE>]                                          ;
             [ALL]                                                          ;
                                                                            ;
          => <v1> := [ <vn> := ] 0                                          ;
           ; DbEval(                                                        ;
                   {|| <v1> += <x1> [, <vn> += <xn> ]},                     ;
                   <{lfor}>, <{lwhile}>, <nnext>, <rec>, <.rest.>, <.noopt.>;
                   )

    .
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    SUM: errore compilatore 07 Jan 2023 19:27 #24944

    • Gfb22
    • Gfb22's Avatar
    • Topic Author


  • Posts: 52
  • Hi Chris,
    your code is the same and the error is the same: "error XS9002: Parser: unespected input ':=' "
    at line 403, Col 15, in dmcd.xh: ( => <v1> := [ <vn> := ] 0 )
    :-)

    Please Log in or Create an account to join the conversation.

    SUM: errore compilatore 07 Jan 2023 19:29 #24945

    • Gfb22
    • Gfb22's Avatar
    • Topic Author


  • Posts: 52
  • ...in dbcmd.xh....

    Please Log in or Create an account to join the conversation.

    SUM: errore compilatore 07 Jan 2023 21:22 #24946

    • Chris
    • Chris's Avatar


  • Posts: 3982
  • Hi Gianluca,

    It's not exactly the same, it's missing the two outer brackets from the first line of the #command, which is I think what confuses the prerpocessor. If the error message stil points to the dbcmd.xh file, it means that it didn't use the local version of the #command. Are you sure you did put it in the same prg where you are getting the error? If it's in multiple prgs, then you would need to put the #command there as well, or, more simply, adjust the #command inside dbcmd.xh directly. (only for now, this should be fixed in one of the next builds).
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    SUM: errore compilatore 08 Jan 2023 18:44 #24947

    • Gfb22
    • Gfb22's Avatar
    • Topic Author


  • Posts: 52
  • ok: tonight I'll try.
    thank you!

    Please Log in or Create an account to join the conversation.

    SUM error: solved 09 Jan 2023 09:01 #24949

    • Gfb22
    • Gfb22's Avatar
    • Topic Author


  • Posts: 52
  • Thanks Chris!
    I modified the C:\Program Files (x86)\XSharp\Include\dbcmd.xh file
    according to your instructions and now it compiles without errors.
    :-)

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1
    Moderators: wriedmann