[sword-devel] Best way to interate through each key in a module
Troy A. Griffitts
scribe at crosswire.org
Thu Feb 25 10:17:07 EST 2021
SWBuf verse = "";
verse = "jn.2.2";
for (verse.size() ? module->setKeyText(verse) : (*module) = sword::TOP;
!module->popError(); (*module)++) {
On 2/25/21 7:14 AM, David "Judah's Shadow" Blue wrote:
> 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)++) {
> The next question I have is, is there an easy way to change this to be at an
> arbitrary key, and TOP if no key is specified?
>
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
More information about the sword-devel
mailing list