How would you code below using a loop?

Forums ProRealTime English forum ProBuilder support How would you code below using a loop?

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • #177755

    tnx Roberto.

    How would you code below using a loop?

    BodyDifference = CLOSE – OPEN

    PrevDayBody1 = BodyDifference[1]
    PrevDayBody2 = BodyDifference[2]
    PrevDayBody3 = BodyDifference[3]
    PrevDayBody4 = BodyDifference[4]
    PrevDayBody5 = BodyDifference[5]
    PrevDayBody6 = BodyDifference[6]
    PrevDayBody7 = BodyDifference[7]
    PrevDayBody8 = BodyDifference[8]
    PrevDayBody9 = BodyDifference[9]
    PrevDayBody10 = BodyDifference[10]
    PrevDayBody11 = BodyDifference[11]
    PrevDayBody12 = BodyDifference[12]
    PrevDayBody13 = BodyDifference[13]
    PrevDayBody14 = BodyDifference[14]
    PrevDayBody15 = BodyDifference[15]
    PrevDayBody16 = BodyDifference[16]
    PrevDayBody17 = BodyDifference[17]
    PrevDayBody18 = BodyDifference[18]
    PrevDayBody19 = BodyDifference[19]
    PrevDayBody20 = BodyDifference[20]
    PrevDayBody21 = BodyDifference[21]
    PrevDayBody22 = BodyDifference[22]
    PrevDayBody23 = BodyDifference[23]
    PrevDayBody24 = BodyDifference[24]

    PrevDayBodyTotal = BodyDifference[1]+BodyDifference[2]+BodyDifference[3]+BodyDifference[4]+BodyDifference[5]+BodyDifference[6]+BodyDifference[7]+BodyDifference[8]+BodyDifference[9]+BodyDifference[10]+BodyDifference[11]+BodyDifference[12]+BodyDifference[13]+BodyDifference[14]+BodyDifference[15]+BodyDifference[16]+BodyDifference[17]+BodyDifference[18]+BodyDifference[19]+BodyDifference[20]+BodyDifference[21]+BodyDifference[22]+BodyDifference[23]+BodyDifference[24]

    #177761

    Do not append different questions in existing topics. Any different question has to be posted in a separate topic to make it easier to retrieve info.

    I moved it.

    Thank you 🙂

    As to your question, you need to clear the tally at the beginning, then just start a loop:

    #177786

    Thank you mate 🙂

Viewing 3 posts - 1 through 3 (of 3 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login