PRB: _WRAP=.T. and ?CHR(9) Cause FoxPro to Scroll Endlessly

ID: Q114133

The information in this article applies to:

SYMPTOMS

If _WRAP = .T. and the command ?CHR(9) is issued, FoxPro for Windows will scroll in a continuous loop. The CHR(9) control code is equivalent to pressing the TAB key. FoxPro for Windows will continue to tab on the desktop unless CTRL+ALT+DEL is pressed or the computer is rebooted.

RESOLUTION

Instead of using ?CHR(9), you can use the KEYBOARD '{tab}' command.

MORE INFORMATION

The _WRAP command contains a logical value that determines whether output automatically word wraps. By default, _WRAP is set to .F. When _WRAP is set to .T., output from the ? command that would extend beyond the right margin automatically wraps to the left margin.

To demonstrate this behavior, make sure the FoxPro logo or any kind of text is on the screen and then issue _WRAP=.T. followed by ?CHR(9) in the Command window. The logo or text will scroll off the screen. If you press CTRL+ALT+DEL, you will be returned to Windows, but the memory that FoxPro used will not be released after FoxPro quits. To verify this behavior, choose About Program Manager from the Help menu. To make this memory available again, you must quit and restart Windows.

Steps to Reproduce Behavior

WARNING! CLOSE ALL APPLICATIONS BEFORE FOLLOWING THIS PROCEDURE. This procedure will cause FoxPro to loop endlessly.

In the Command window, issue these commands:

   _WRAP=.T.
   ?CHR(9)

To exit the loop, press the CTRL+ALT+DEL key combination.

Additional reference words: FoxWin 2.50 2.50a 2.50b exit infinite endless KBCategory: kbprg kbprb KBSubcategory: FxtoolGeneral

Last Reviewed: June 27, 1995