[Gambas-user] using 'output to' and error to'
Bruce
adamnt42 at gmail.com
Wed Jul 15 03:48:44 CEST 2020
On 15/7/20 10:58 am, Bruce wrote:
> At a guess, File.Out is always stdout, regardless of redirection. That
> way you can ensure that you will print on the console.
> Maybe, maybe not.
> b
>
Consider the following, (somewhat stupid), example:
Public Sub Main()
Dim blackhole As File
blackhole = Open Null
If Not (User.Name = "myname") Then Error To #blackhole
Error "User won't see this.\nIt's for special people only.\n" &
System.Backtrace.Join("\n")
Print #File.Err, "STOP! Call the IT crowd immediately"
End
More information about the User
mailing list