Re: Value & parentheses when doing math

2018-04-02 Thread Tom Glod via use-livecode
the 2nd one is the one most readable to me so thats the one i would use On Mon, Apr 2, 2018 at 6:08 PM, Richard Gaskin via use-livecode < use-livecode@lists.runrev.com> wrote: > Knapp Martin wrote: > > I have a tab delimited list where item 4 is a number and I'm adding > > things up. What is

Re: Value & parentheses when doing math

2018-04-02 Thread Richard Gaskin via use-livecode
Knapp Martin wrote: > I have a tab delimited list where item 4 is a number and I'm adding > things up. What is considered best practice when doing this? > > add item 4 of line x of tList to tRunningTotal > or > add (item 4 of line x of tList) to tRunningTotal > or > add value(item 4 of line x of

Re: Value & parentheses when doing math

2018-04-02 Thread Bob Sneidar via use-livecode
The second one is more readable. The third is unnecessary. The first works just fine. It just depends on how readable you want to make your code for others. I always take the time to put values into their own variables so I can point at them in the debugger and see their current values in the

Value & parentheses when doing math

2018-04-02 Thread Knapp Martin via use-livecode
I have a tab delimited list where item 4 is a number and I'm adding things up. What is considered best practice when doing this? add item 4 of line x of tList to tRunningTotal or add (item 4 of line x of tList) to tRunningTotal or add value(item 4 of line x of tList) to tRunningTotal Marty