Value & parentheses when doing math

Tom Glod tom at makeshyft.com
Mon Apr 2 18:30:24 EDT 2018


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 at 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 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
>
> IMO whatever is the easiest to write and read that gets the job done is
> the best option.
>
> The first example above seems simplest to me.
>
> The second one isn't bad, but the third one should be avoided unless you
> have something in the data that requires the overhead of adding a call to
> the value function.
>
> --
>  Richard Gaskin
>  Fourth World Systems
>  Software Design and Development for the Desktop, Mobile, and the Web
>  ____________________________________________________________________
>  Ambassador at FourthWorld.com                http://www.FourthWorld.com
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the Use-livecode mailing list