Announcement

Collapse
No announcement yet.

code will not execute

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

  • Lloyd Plantholt
    replied
    Alone by itself it will work, but in a program with a few more
    subroutines it does not work.
    I guess I should put the the wholoe program out here and be done
    with it.


    ------------------

    Leave a comment:


  • Steve Rossell
    replied
    I stepped through your code in the debugger and this line did execute.
    I also watched the variable PXX and after entering 55 for DXX and executing this line PXX contained the value of .55.
    Try stepping through your code using the debugger and watching variables and see if this line executes.

    Code:
    gosub DISC1
    end
    
    DISC1:
    TOTALA = 1000.00
    LOCATE 22,30: INPUT "ENTER DISC.PCT. ",DXX
    PXX = DXX * .01 '<---does NOT execute this line in subroutine
    DSC = TOTALA * PXX
    bala = TOTALA - DSC
    LOCATE 22,30: PRINT " "
    LOCATE 20,15: PRINT using$("######.####",PXX)
    LOCATE 21,10: PRINT "PXX= ";PXX
    LOCATE 19,55: PRINT DXX;"% Disc"
    LOCATE 19,65: PRINT USING$("#######.##",DSC)
    LOCATE 20,65: print using$("#######.##",bala)
    return
    Steve Rossell
    PowerBASIC Staff

    Leave a comment:


  • Lloyd Plantholt
    started a topic code will not execute

    code will not execute




    DISC1:
    TOTALA = 1000.00
    LOCATE 22,30: INPUT "ENTER DISC.PCT. ",DXX
    PXX = DXX * .01 '<---does NOT execute this line in subroutine
    DSC = TOTALA * PXX
    bala = TOTALA - DSC
    LOCATE 22,30: PRINT " "
    LOCATE 20,15: PRINT using$("######.####",PXX)
    LOCATE 21,10: PRINT "PXX= ";PXX
    LOCATE 19,55: PRINT DXX;"% Disc"
    LOCATE 19,65: PRINT USING$("#######.##",DSC)
    LOCATE 20,65: print using$("#######.##",bala)
    return


    ------------------
Working...
X