[Gambas-user] Can you clear the console from within gambas code?

Doriano Blengino doriano.blengino at ...1909...
Sat Sep 20 08:42:07 CEST 2008


richard terry ha scritto:
> Can you clear the console from within gambas code?
>
> Wondered, as this would be useful for me at the moment whilst I'm tracking 
> bugs.
>
> Regards
> Richard
>   
I don't know if you can clear the gambas console from a program - 
chances are you can't.

But this could be useful to you: there is an "ERROR TO" statement, and 
you can redirect the standard error elsewhere (a file...); so you can 
"grep" or whatever the file and examine more easily the things.

Benoit: when I start to write complex applications, I first put a log 
routine which the program calls in relevant points, passing a "topic", a 
"level", and the debug message (or sometimes only level and message) - 
this is the same as the linux syslog facility.
The log routine then decides whether to discard the message, if its 
level is lesser than DebugLevel. DebugLevel can be set in code or by 
command line. May be a more sofisticated DEBUG instruction could be 
useful in such cases. Just an idea...

Regards,
Doriano Blengino






More information about the User mailing list