min() function anomalies
Jim Ault
JimAultWins at yahoo.com
Wed Jun 13 16:20:58 EDT 2007
You always have to be wary of trailing delimiters.
the number of lines, items
min(), max(), sum()
Look for the empty "last" item/line you want to keep, if needed.
put item 1 to -1 of dataList into dataList --drops the last delim
Not sure if it is a bug or feature, but is an issue in some cases.
Jim Ault
Las Vegas
On 6/13/07 12:46 PM, "Shari" <shari at gypsyware.com> wrote:
> This may not affect any of you, but I discovered a change that has
> sent me scurrying thru a lot of hoops wondering why my code was
> broken.
>
> The original Metacard handled the min() function as Hypercard once
> did. But later versions handle it differently. If your program was
> originally written in Hypercard or Metacard and ported to Revolution,
> you might be affected by this.
>
> The min() function returns different results depending on the engine version:
>
> min(1,2,3,4,) # note the extra comma
>
> Hypercard 2.4.1 = 1
> Metacard 2.4.3 = 1
> MC/Rev 2.7.4 = 0
> MC/Rev 2.8.1 = 0
>
> I do not know if Rev would consider this a bug, or a "feature". Does
> anybody know?
>
> max(1,2,3,4,) produces 4, as one would expect.
>
> Shari
More information about the use-livecode
mailing list