I'll give it a test in a few days
Two questions here. #purchasecost is a floating-point with format of $x.xx.
Code:
program:
if $$#purchasecost ==# '0.00' then '0.00'
elif $$#purchasecost <=# '0.99' then '$0.01 - $0.99'
elif $$#purchasecost <=# '4.99' then '$1.00 - $4.99'
elif $$#purchasecost <=# '10.00' then '$5.00 - $9.99'
elif $$#purchasecost <=# '15.00' then '$10.00 - $14.99'
elif $$#purchasecost <=# '15.00' then '$10.00 - $14.99'
elif $$#purchasecost <=# '20.00' then '$15.00 - $19.99'
elif $$#purchasecost <=# '30.00' then '$20.00 - $29.99'
elif $$#purchasecost >=# '30.00' then '$30.00 and up'
fi
a) This'll always try to show the first entry for undefineds.
if $$#purchasecost ==# '' then '' best option?
b) More out of curiosity: The first time I made this template, I forgot to add the '#' to all the cmps. Line 11,
>= '30.00', showed up on undefineds. This didn't happen for
== or
<=. How did it get 'undefined is more than 30.00'?