View Single Post
Old 07-08-2025, 06:37 AM   #3
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,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
I think this does what you want. The trick is to loop through the characters. Your template operated on only the first character in the list.
Code:
program:
	result = '';
	if $#chars then
# Loop through the characters adding the universe prefix
		for char in '#chars':
			result = strcat(result, first_non_empty($#universe, $series, $title), '.', char, ',')
		rof;
# Clean up the list, adding spaces and removing the trailing comma
		result = list_union(result, '', ',')
	fi;
	result
chaley is offline   Reply With Quote