View Single Post
Old 01-06-2023, 04:57 PM   #456
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,109
Karma: 77213681
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
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'?

Last edited by ownedbycats; 01-06-2023 at 05:01 PM.
ownedbycats is offline   Reply With Quote