Thanks I give it a try. I got the creating modules problem fixed. I just had the syntax wrong.
Thanks so much for you help. Chad On Thu, 2003-01-30 at 19:04, Joachim Ansorg wrote: > Chad, > it's done now. > Update your CVS to get the new functions. > > I implemented bookCount, bookName, chapterCount, verseCount. All in VerseKey. > See versekey.i for documentation iof these functions. > > See attached script as an example. This script prints out the Bible structure. > If you ask me, it's simpler and faster to code than in C++ ;-) > > Let me know if it works and if you need more functionslity, > Joachim > > > In SWIG Perl, is there a way to find out how many verses are in a > > chapter and how many chapters are in a book? > > > > Thanks > > Chad > > > > _______________________________________________ > > sword-devel mailing list > > [EMAIL PROTECTED] > > http://www.crosswire.org/mailman/listinfo/sword-devel > > -- > Joachim Ansorg > www.bibletime.info > www.ansorgs.de > > ---- > > #!/usr/bin/perl -w > use Sword; > use strict; > my $key = Sword::VerseKey->new(); > > foreach my $testament (1, 2) { > print "Testament $testament\n"; > > for my $book (1 ... $key->bookCount($testament) ) { > my $bookname = $key->bookName( $testament, $book ); > print "\t$bookname (book number $book in testament $testament)\n"; > > for my $chapter ( 1 ... $key->chapterCount($testament, $book) ) { > print "\t\t$bookname $chapter\n"; > > for my $verse ( 1 ... $key->verseCount($testament, $book, >$chapter) ) { > print "\t\t\t$bookname $chapter:$verse\n"; > } > > } > } > } _______________________________________________ sword-devel mailing list [EMAIL PROTECTED] http://www.crosswire.org/mailman/listinfo/sword-devel