Page / Window Count (Expression) — skLambda

Addon: skLambda · Category: Expression · Since: 1.2.0

Syntax

[the] (page count|number of pages) of %objects% by %number%

Description

How many pages or windows of a given size a list splits into, for sizing GUI navigation. `page count of %objects% by S` is the number of size-S chunks (rounded up, so a partial last page still counts). `window count of %objects% by S` is the number of size-S sliding windows: `length - S + 1`, or 0 if the list is shorter than S.

Examples

set {_pages} to page count of {_items::*} by 9
loop {_pages} times:
	set {_slots::*} to page loop-value of {_items::*} by 9

View source