none
Changing Value in Variable : Help ! RRS feed

  • Question

  • Help,

    How can a variable change its value when a proc calls another proc:

    Sub MainProc()

    DecapTerVeg = 12255

    Call OtherProc (DecapTerVeg)

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

    OtherProc (DecapTerVeg)

    here, value of DecapTerVeg = 2532.7 ????????

    What I'm missing ?

    Thanks for your help


    PS : The same issue happens for another variable in the same proc (which is working with 12 variables)
    • Edited by WLID1966 Wednesday, November 9, 2016 2:35 PM
    Wednesday, November 9, 2016 1:00 PM

Answers

  • I found the solution:

    A proc calls another one with 10 variables:

    Call OtherProc (V1,V2,V3,V4,V5,V6,V7,V8,V9,V10)

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

    The other proc is waiting for the 10 variables:

    Sub OtherProc (V1,V2,V3,V4,V5,V6,V8,V7,V9,V10)

    NB: V7 and V8 commuted their positions.... and they exchanged their value ! So the issue.

    What are the rules which govern such variable transfer between procs?

    Thanks


    • Edited by WLID1966 Wednesday, November 9, 2016 3:39 PM
    • Marked as answer by WLID1966 Monday, June 5, 2017 7:18 PM
    Wednesday, November 9, 2016 3:38 PM