#Cls
#Cls
 
Parameters: NONE
Returns: NONE
 

      #Cls will clear all the strings and numeric values from the debuggers console.

      It's important to note, that the #CLS command is only available when compiling your program in debug mode. Since #Cls is debugger feature, PlayBASIC will ignore these statements completely if you compile in normal mode.



FACTS:


      * #Cls command is only available when a program is compiled in a DEBUG mode.




Mini Tutorial:


      In this example were going to dump a random number to the debuggers console. Once we've done this 10 times we'll clear the console window and continue on.

  
  Do
   ; Clear the screen
     Cls RGB(0,0,0)
     
   ; Display a messaage to show the program is running.
     Print "This Program is running.."
     
     Print "Remind the user to compile this code in DEBUG MODE (F6)"
     
     
   ; Print a random number to the debug console
     #Print Rnd(100)
     
     Inc count
   ; when count is greater than 9 then reste the count
   ; variable and clear the debugger console
     
     If Count > 9
      ; clear the debugger console
        #Cls
      ; Reset the counter variable to zero
        count=0
     EndIf
     
     
     
   ; Display the Screen and loop back to the DO
     Sync
  Loop
  




This has two separate outputs. The first and most obvious is to the screen and second is to the debuggers console.

Screen Output
  
  This Program is running..
  Remind the user To compile this code in DEBUG MODE (F6)
  



This will have list of constabt refreshing list random numbers in it, something like this.

Debugger Console Output
  
  34
  45
  01
  99
  34
  46
  21
  20
  33
  



 
Related Info: #Break | #Print :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com