On 17 Feb 98 at 0:34, Jim Smithheisler wrote: > Bill Hornkohl wrote: > <I created a simple program in qbasic, processing sequential files from a > <question would be is there such a thing as a page-break in qbasic. If > > I haven't programmed in qbasic but in the basics prior to qbasic and most > other languages I've worked with I usually can send a CHR(10) CHR(13) > sequence to the printer to force a carriage return/line feed combination to > force a page break. > > I will declare a string variable and load it with the sequence something > like this: > CRLF$=CHR(10)+CHR(13) > then whenever I print CRLF$ to the printer I will get a formfeed > > Some languages and printers will also recognize CHR(12) as a formfeed > character. A line break (CR, LF, or CRLF) is only occasionally and accidentally equivalent to a form feed. Microsoft BASICs have had a tendency, historically, to keep an internal column count and to insert a line break when that reaches the right margin (based on a default, overridable with the WIDTH statement. Note that the internal column counter generally doesn't look at the character stream to recognize CRLF etc. This isn't usually a problem for line breaks, because you can get a CRLF and reset the counter by just leaving the closing ';' off a PRINT or LPRINT statement. But it *is* a problem if you start using CHR$() for other functions such as cursor positioning -- or form feed. That's why most professional QBASIC code uses the WIDTH statement right up front to turn off the default line breaks, and while an analogous pagelength setting, if it exists, should not be relied upon. David G PCSOFT: http://nospin.com or [log in to unmask]