View Single Post
Old 07-23-2022, 02:14 PM   #9
Wiggo
Leftutti
Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.
 
Wiggo's Avatar
 
Posts: 551
Karma: 1717097
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
note to myself: buy chaley some beer

three-letter value

Code:
program:
	def add_icon(icon, val):
		if icon == '' then icon = val else icon = icon & ':' & val fi;
		return icon
	fed;

	icon = '';
	if $languages == 'eng' then icon = add_icon(icon, 'uk.png') fi;
	icon = add_icon(
		icon, 
		switch(
			$$#toread,
			'true', 'toread.png',
			'false', 'false.png',
			''));
	if $$#redl == 'true' then icon = add_icon(icon, 'redl.png') fi;
	if $$#read == 'true' then icon = add_icon(icon, 'ok.png') fi;
	return icon
Two modifications to your code. I had to add "icon =" to both bottom ones. It took me a while to figure this out.

Wiggo is offline   Reply With Quote