Announcement

Collapse
No announcement yet.

PB 9.00.0085 Compiler GPF with Win XP Serv Pack 3

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Michael Mattias
    replied
    Code:
    PAU.COMPENSATION(J)+=I         'THIS LINE CAUSES A COMPILER GPF
    ' PAU.COMPENSATION(J)=PAU.COMPENSATION(J)+I  'THIS LINE WORKS
    If line B works and line A don't... call me naive but it sure seems to me there is clearly a problem with the "+=" operator and you done good by sending in the code.

    Leave a comment:


  • José Roca
    replied
    Of course you got an error. Compound assignments like += aren't supported in version 8.04.

    Leave a comment:


  • Cliff Nichols
    replied
    Just for

    I went back to PB 8.04 and tried a compile and this is what I got instead of a GPF. (Maybe it can help)

    PowerBASIC for Windows
    PB/Win Version 8.04
    Copyright (c) 1996-2007 PowerBasic Inc.
    Venice, Florida USA
    All Rights Reserved

    Error 415 in O:\POWERB~4\HELPOT~1\NATHAN~1\GPF.bas(27:028): "=" expectedÿÿÿ
    Line 27: PAU.COMPENSATION(J)+=I 'THIS LINE CAUSES A COMPILER GPF
    ==============================
    Compile failed at 10:43:38 AM on 7/2/2009

    Leave a comment:


  • Nathan Maddox
    replied
    Thank You Paul Squires and others

    I have sent the code to [email protected]

    When I dumbed down the code for posting (so Michael wouldn't ask for it), I inadvertently changed it to "auto-incrementing" a long to a currency.

    In my original code, I was adding currency to currency.

    The GPF seems to be related to the UDT not the data types that
    are added.

    Thanks

    Leave a comment:


  • Peter Redei
    replied
    It looks like a bug.
    Both

    c = PAU.COMPENSATION(J)
    c += I
    PAU.COMPENSATION(J) = c

    or

    PAU.COMPENSATION(J) = PAU.COMPENSATION(J) + I

    work instead of PAU.COMPENSATION(J)+=I


    Peter Redei

    Leave a comment:


  • Scott Slater
    replied
    Send it to [email protected]

    Leave a comment:


  • Paul Squires
    replied
    It GPF's for me in 9.01 as well.

    Leave a comment:


  • PB 9.00.0085 Compiler GPF with Win XP Serv Pack 3

    Does anyone else get a compiler GPF with this code ?


    Code:
    #COMPILE EXE
    #DIM ALL
    
    TYPE PAMatrix                                        
       Compensation       (1 TO 2)  AS CURRENCY
       SickPay            (1 TO 2)  AS CURRENCY
       Interest           (1 TO 2)  AS CURRENCY
       Dividends          (1 TO 2)  AS CURRENCY
       EstateTrust        (1 TO 2)  AS CURRENCY
    END TYPE
                  
    FUNCTION PBMAIN () AS LONG
    
       LOCAL   A1 AS CURRENCY
       LOCAL   I, J  AS LONG
       
       DIM PAU  AS PAMATRIX
       
       FOR J=1 TO 2
          FOR I=1 TO 100
            PAU.COMPENSATION(J)+=I         'THIS LINE CAUSES A COMPILER GPF
          ' PAU.COMPENSATION(J)=PAU.COMPENSATION(J)+I  'THIS LINE WORKS
          NEXT
       NEXT
          
       ? "PAU.COMPENSATION(1)="+STR$(PAU.COMPENSATION(1))
       ? "PAU.COMPENSATION(2)="+STR$(PAU.COMPENSATION(2))
        
    END FUNCTION
Working...
X