Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: _PAGENO incremented with TEXT ENDTEXT
Message
 
To
22/10/2003 22:30:44
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00841414
Message ID:
00841417
Views:
24
Charlie,

TEXT ..ENDTEXT outputs lines of text to a device. _PAGENO is incremented based on the value of _PLENGTH (which by default is 66), thus every 66 lines the _PAGENO is incremented. Also, the output starts at _PLINENO which may not be 0 when your program starts executing.
Thus, nPages = INT((_PLINENO + nLines)/_PLENGTH) + 1, where nLines is the number of lines of text output, 129 in this case.

HTH


>TEXT ENDTEXT causes the _PAGENO variable to be incremented. Here's the repo code:
>
>CLEAR
>_PAGENO = 1
>HoldPage = _PAGENO
>
>FOR x = 1 TO 129
>   TEXT TO m.myVar NOSHOW
>      "Hello World"
>   ENDTEXT
>   IF _PAGENO <> m.HoldPage
>      HoldPage = _PAGENO
>      ? 'x = ' + TRANSFORM(m.x) + " and _PAGENO = " + TRANSFORM(_PAGENO)
>   ENDIF
>ENDFOR
>? _PAGENO
>
>For me, running this in VFP 7 or 8 causes the _PAGENO variable to increment to 3. If I'm missing something, please let me know.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform