Clearing a section of the screen works in CMD, not in TC

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
Hi,
I'm using

Code:
TCC  11.00.39   Windows XP [Version 5.1.2600]
TCC Build 39   Windows XP Build 2600  Service Pack 3
I have a need to clear a section of the console screen. I have written a program to do so;

Code:
#COMPILE EXE
#DIM ALL

FUNCTION PBMAIN () AS LONG
  LOCAL Direction$
  LOCAL LinesToScroll&
  LOCAL y1&, x1&, y2&, x2&
  
  Direction$ = COMMAND$(1)
  LinesToScroll& = VAL(COMMAND$(2))
  y1& = VAL(COMMAND$(3))
  x1& = VAL(COMMAND$(4))
  y2& = VAL(COMMAND$(5))
  x2& = VAL(COMMAND$(6))
  
  SELECT CASE UCASE$(Direction$)
    CASE "UP"
      SCROLL UP LinesToScroll&, y1&, x1&, y2&, x2&
    CASE "DOWN"
      SCROLL DOWN LinesToScroll&, y1&, x1&, y2&, x2&
    CASE "LEFT"
      SCROLL LEFT LinesToScroll&, y1&, x1&, y2&, x2&
    CASE "RIGHT"
      SCROLL RIGHT LinesToScroll&, y1&, x1&, y2&, x2&
    CASE ELSE
      SCROLL DOWN LinesToScroll&, y1&, x1&, y2&, x2&
  END SELECT
END FUNCTION
I have CMD.EXE running in a TC tab, and when I run my program as such;

Code:
scroll up 16 10 5 20 80
The screen is cleared in the indicated area.

When I run it in a TCC window, it does not clear the indicated area. It does nothing. I only have one copy of SCROLL.EXE that I am running from the exact same directory.

Is there a setting in TC that I have to set in order for my program to work as it does in CMD.EXE?

Joe
 
#3
Take Command just displays the contents of the console window; it cannot be
involved here.

Does the screen clear if you run a stand-alone TCC session?

(This would be easier to do in TCC using ANSI commands.)

Rex Conn
JP Software
Hi,
I closed out TC, and then started it again. My program now works in TCC and CMD. Not sure why it did not work before, but no problems now. Weird.

Joe