[sword-devel] Best way to interate through each key in a module

David "Judah's Shadow" Blue yudahsshadow at gmx.com
Wed Feb 24 13:52:32 EST 2021


On Tuesday, February 23, 2021 6:17:57 PM EST Troy A. Griffitts wrote:
> So, in your first example, you are attempting to assign the module
> pointer to TOP and increment the module pointer, instead of the module.
> You could change that for loop to this and it should work:
>
> for ((*module) = sword::TOP; !module->popError(); (*module)++) {

Thank you, that worked perfectly. For those interested, I've pushed read mode
into the main branch on github. I still need to generalize this to start at an
arbitrary point rather than just the start of the module, and my pagination
isn't working quite the way I intended, but it otherwise works.




More information about the sword-devel mailing list