[Gambas-user] using 'output to' and error to'

Bruce adamnt42 at gmail.com
Wed Jul 15 02:50:56 CEST 2020


Public Sub Main()

   Dim mfile As File

   mfile = Open Temp() For Write Create
   Output To mfile

   Print "hello standard"

   Print #mfile, "Hello file.out"
'       ======

End

On 14/7/20 12:03 am, Brian G wrote:
> When using output to or error to
> 
> It seems that it only changes the destination for print "this string and error "this string"
> 
> but when using #print file.out, "this string" or print #file.err, "this string" the output is not redirected
> 
> Is this deliberate?
> 
> example:
> 
> Public Sub Main()
> Dim mfile As File
> mfile = Open Temp() For Write Create
> Output To mfile
> Print "hello standard"
> Print #File.out, "Hello file.out"
> End
> 
> Always put the second print to the console, and the first to the file.
> The same happens for Error to
> Error "Hello standard"
> print #file.err,"Hello file.err"
> 
> 
> Thank You
> Brian G
> 
> 
> 
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
> 


More information about the User mailing list