Results 1 to 3 of 3

Thread: local var

  1. #1

    local var

    i have an action named Action3() and declared 2 var as follows..there are other functions in the same action of LR.

    char a[30];
    char b[30];

    {usign var a and b here

    1. the var a and b looks avaliable to all the funcions in that action.
    2. Also if i have the same variable a and b declared in action4() will they remain disturbing each other ?
    in other words do they remain local to their own actions?


  2. #2

    Re: local var

    If you don't have a good C book pick one up. When declared outside of a function variables are global and can be accessed from any function. A same named variable declared in a function / block will shadow (block out) the global version.

    Local variables (variables declared in a function or block) only exist while in that function or block.
    Unless you are writing a compiler, strtok is NOT the answer.
    See: http://www.sqaforums.com/showflat.ph...=541641#542222

    QAF is still an exercise in self-sufficiency! (Thank JB!)

  3. #3

    Re: local var

    thx ptrussell ...
    so even though a and b is decalred global in that block/action ..declaring again in another block or action will only use the local value of that var in that action/block..

    that is the behaviour am expecting..so that on a mulituser run the values remail local to the action and wont be gettting wrong values..



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 07:15 PM.

Copyright BetaSoft Inc.