View Single Post
Old 04-11-2023, 10:35 AM   #569
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,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
For a formula for various book statistics: is there a function similar to round, but rounding to a certain number of decimal points instead of a whole number?

EDIT: format_number works. New question: How do I add a line break? This returns as one long line.

Code:
program:
strcat(
	'Chapter Count:', $#chaptercount,
	'Page Count:', $#pagecount,
	'Average Pages per Chapter:', format_number((divide($#pagecount, $#chaptercount)), '{0:5.2f}')
	)
Use the character() function, specifically character('newline')
chaley is offline   Reply With Quote