[sword-devel] mod2osis - linked verses ....

DM Smith dmsmith at crosswire.org
Wed Apr 29 04:27:07 MST 2009


On Apr 29, 2009, at 2:41 AM, Troy A. Griffitts wrote:

> One issue below (and yes! I believe it is a wonderful goal to have  
> mod2osis actually produce valid OSIS!) :)
>
>>   // have to increment in case you don't get in the loop body
>>   endRange.increment();
>>   // check error so that if you are on the last verse in the  
>> versification, you don't loop forever.
>>   while (!endRange.Error() && myModule.isLinked(myKey, endRange)) {
>>          endRange.increment();
>>   }
>
> At this point Error() (in the code below) will always return false.   
> It is cleared in the while loop above.  Error() returns the error  
> code and brings low the error bit.

If endRange.Error() has returned true and myModule.isLinked(myKey,  
endRange) returns false, exiting the loop, the call to  
myModule.isLinked will set error on endRange?

>
>
>
>>   // If you hit the last verse you don't need to decrement
>>   if (!endRange.Error()) {
>>       endRange.decrement();
>>   }
>>   // test to see that you have a range.
>>   if (myKey != endRange) {
>>      ... then I have a range ...
>>   }
>
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page




More information about the sword-devel mailing list