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 cons
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 t
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 st
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
_