View Single Post
Old 01-09-2023, 02:48 PM   #471
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,111
Karma: 77213681
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Here's what I came up with:

Code:
program:
## list_remove_duplicates probably isn't necessary
	list = list_remove_duplicates($#fanficrating, ',');

	first_non_empty(
		if 'Explicit' inlist list then 'Explicit' fi,
		if 'Mature Audiences' inlist list then "Mature Audiences" fi,
		if "Teen and Up Audiences" inlist list then "Teen and Up Audiences" fi,
		if "General Audiences" inlist list then "General Audiences" fi,
		if "Not Rated" inlist list then "Not Rated" fi
	)

The first_non_empty question I was thinking of something along the lines of:

Code:
	first_non_empty inlist list(
		"Explicit",
		"Mature Audiences"
		"Teen and Up Audiences"
		"General Audiences"
		"Not Rated"
	)

Last edited by ownedbycats; 01-09-2023 at 03:44 PM.
ownedbycats is offline   Reply With Quote