APFormat: improved for loop.