Or, put "Open" outside of the loop.
Jussi
On Wed, Aug 17, 2011 at 16:43, Jesus wrote:
> El 15/08/11 14:03, wally escribió:
> > Hi,
> >
> > i try to write data to a new file in the following way:
> >
> > Public hFile As File 'because i need to write in a
> serial_read_event
> >
> > h
El 15/08/11 14:03, wally escribió:
> Hi,
>
> i try to write data to a new file in the following way:
>
> Public hFile As File 'because i need to write in a serial_read_event
>
> hFile = Open Application.Path &/ "prot.log" For Write Create
>
> Write #hFile, Hex$(iByte, 2)
>
> hFile
I agree. The code looks correct.
-- Original Message ---
From: Jussi Lahtinen
To: mailing list for gambas users
Sent: Tue, 16 Aug 2011 19:31:19 +0300
Subject: Re: [Gambas-user] write to file question
> What is your Gambas version and operating system?
> Can yo
Maybe you need to flush some stream before closing?
Jussi
On Tue, Aug 16, 2011 at 19:31, Jussi Lahtinen wrote:
> What is your Gambas version and operating system?
> Can you send demonstration project?
> Code in your mail seems to be OK, so I think the problem is somewhere else.
>
> Jussi
>
>
>
What is your Gambas version and operating system?
Can you send demonstration project?
Code in your mail seems to be OK, so I think the problem is somewhere else.
Jussi
On Mon, Aug 15, 2011 at 15:03, wally wrote:
> Hi,
>
> i try to write data to a new file in the following way:
>
> Public hF
Hi,
i try to write data to a new file in the following way:
Public hFile As File 'because i need to write in a serial_read_event
hFile = Open Application.Path &/ "prot.log" For Write Create
Write #hFile, Hex$(iByte, 2)
hFile.Close
Problem is that the filesize is growing during