[Gambas-user] Bug / changed behaviour of Input

Jussi Lahtinen jussi.lahtinen at ...626...
Wed Mar 14 14:15:27 CET 2012


Wait... How input determines how much is read?

To read all what is written with this;

  hFile = Open "/tmp/testingtesting/Test.txt" For Output Create
  Print #hFile, "Test1"
  Print #hFile, 123
  Print #hFile, CDate(2484515)
  Print #hFile, " 1-2/3/4/5_6*7-8+9"
  Close hFile


I need to call input six times;

  sStr = ""
  sTest = ""
  hFile = Open "/tmp/testingtesting/Test.txt" For Input
    For ii = 1 To 6
      Input #hFile, sStr
      sTest &= sStr
    Next
  Close hFile

And still one white space is missing, "1-2/3/4/5_6*7-8+9" instead of "
1-2/3/4/5_6*7-8+9".

I'm not sure input is right method for reading such data... I always use
command Read.
Is this correct?

Jussi









On Wed, Mar 14, 2012 at 14:59, Jussi Lahtinen <jussi.lahtinen at ...626...>wrote:

> Yes, it works now.
>
> Jussi
>
>
>
>
> 2012/3/14 Benoît Minisini <gambas at ...1...>
>
>> Le 14/03/2012 13:12, Jussi Lahtinen a écrit :
>> >    hFile = Open "/tmp/testingtesting/Test.txt" For Output Create
>> >    Print #hFile, "Test1"
>> >    Close hFile
>> >
>> >    sStr = ""
>> >    hFile = Open "/tmp/testingtesting/Test.txt" For Input
>> >    Input #hFile, sStr
>> >    Close hFile
>> >
>> >
>> >> From revision 4549, sStr remains null.
>> >
>> >
>> > Jussi
>> >
>>
>> Is it better with revision #4552?
>>
>> --
>> Benoît Minisini
>>
>>
>> ------------------------------------------------------------------------------
>> Virtualization & Cloud Management Using Capacity Planning
>> Cloud computing makes use of virtualization - but cloud computing
>> also focuses on allowing computing to be delivered as a service.
>> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GambasTester-0.9.25.tar.gz
Type: application/x-gzip
Size: 16992 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20120314/c12ee03d/attachment.bin>


More information about the User mailing list