View Single Post
Old 02-12-2021, 06:10 AM   #310
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,495
Karma: 8065348
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by capink View Post
It would be something along those lines ...

Code:
program:
	genre = field('#genre');
	kobocoll = field('#kobocoll');
	intersection = list_intersection(genre, 'fantasy,science-fiction', ',');
	if intersection == '' then
		strcat(kobocoll)
	else
		strcat(kobocoll, ',Fantasy & Sci-Fi')
	fi
FWIW: the line 'strcat(kobocoll)' can be written simply as 'kobocoll'.
chaley is offline   Reply With Quote