View Single Post
Old 01-14-2022, 07:19 AM   #796
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: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Regarding:
Code:
program:
	totalpage = $#pagecount;
	pagenum = globals(pagenum);
	newpercent = round(multiply ((totalpage / pagenum), 100));
"globals" is like "arguments", not really a function. You should say
Code:
globals(pagenum);
not
Code:
pagenum = globals(pagenum);
In your case it works by accident because globals returns the value it assigns to the last argument. It would stop working if you said
Code:
pagenum = globals(pagenum, foobar);
chaley is offline   Reply With Quote