[futurebasic] Re: [FB] Page Number

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 2000 : Group Archive : Group : All Groups

From: tedd@...
Date: Mon, 9 Oct 2000 09:39:53 -0400
Jim:

It's because your using an integer for "TotalPages" -- however using
anything else wouldn't work either.

The expression: TotalPages = gMyCount/66 is zero (instead of 1 which you
want) if gMyCount is less than 66. If gCount is greater than 66, then
everything is Okay.

I suggest that you place --

   IF gMyCount < 66 THEN gMyCount = 66

-- in your routine.

tedd

---

>'After Noon
>
>I'm in a dilemma .. My Catalog index Page has a maximum of 66 names
>listed per page
>
>The below FN give me a correct number of pages .. IF .. The last page has
>exactly 66 names ..
>
>My "Base" is "gMyCount" which is the Total Number of PICTs in the Catalog
>
>Which I divide by 66
>
>TotalPages = gMyCount/66
>
>Again .. Absolutely correct ..  ONLY .. If the last page has exactly 66
>names ..
>
>BUT .. If it has 1 to 65 names .. I get a Total Page Count that is one
>short
>
>Now I can compensate for the "Odd Number of Names" on the last page by
>adding 1
>
>TotalPages = gMyCount/66 + 1
>
>But .. If the last page DOES HAVE exactly 66 names .. I get a total page
>count that is 1 to many ..
>
>Its a, Bedamned if I Do & Bedamned If I Don't, add the 1 .. Frustrating
>as all get out
>
>Skill at Math was never a Salient Attribute of mine and coupled with
>Syntax .. Any and all efforts to come up with a way to determine if it
>needs the 1 added or not, has lead to naught ..
>
>Any help would be most deeply appreciated
>
>CLEAR LOCAL
>LOCAL FN NumberIndexPage
>  DIM Tp$,TotalPages
>  TotalPages = gMyCount/66
>  Tp$ = "Page" + STR$ (gIndexPage) + " of " + STR$ (TotalPages)
>  FN ColoredText (Tp$,7,9000,12,0,670,608,2)
>END FN
>
>
>
>Jim Henson,The Vegas Swede, (^_^) s aplenty
>
>Las Vegas is the Number One Fun Capital Of The World
>An Oasis Dedicated To Around The Clock Entertainment
>Come Often, Enjoy Its Many Pleasures, Stay A Spell
>And Bring Lots Of Money, Help Keep Nevada Green
>
>
>--
>To unsubscribe, send ANY message to <futurebasic-unsubscribe@...>


http://sperling.com/
_______________________________________________________
Thinking about buying Jewelry?
Try our site: http://earthstones.com