View Single Post
Old 09-14-2013, 12:44 PM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,475
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Try something like this template in general program mode, with #myint changed to the appropriate lookup key.
Code:
program:
	t = "Unread, Started but so bad I didn't finish reading it, Poor but finished reading it,";
	t = strcat(t, "Almost OK, OK, Better than OK, Almost good, Good,");
	t = strcat(t, "Better than good, Almost great, Great");
	index = ifempty(field('#myint'), 0);
	val =  list_item(t, index, ',');
	cmp(index, 10,val, val,  'Huh?')
chaley is offline   Reply With Quote