[Gambas-user] Strange behaviour of File.Read
adamnt42 at ...626...
adamnt42 at ...626...
Wed Jun 21 16:13:47 CEST 2017
On Wed, 21 Jun 2017 06:36:01 -0700 (MST)
bill-lancaster via Gambas-user <gambas-user at lists.sourceforge.net> wrote:
> I must be missing something - any ideas?
> Gambas3.9.2
> Components, gb.form, gb,gui, gb.image
>
> This is the code:-
>
> Public Sub Button1_Click()
> Dim s As String
> s = File.Load(User.Home &/ "Pictures/PhotoFolder.txt")
> Print s
> Print IsDir(s)
> Print IsDir("/home/bill/Pictures/Family/Visits/2000-07-29")
> End
>
> This is the output:-
>
> "/home/bill/Pictures/Family/Visits/2000-07-29"
> <- Looks like an extra line feed
> False
> True
>
I think there is a line termination character in the PhotoFolder.txt file so
Print IsDir(s) is seeing "/home/bill/Pictures/Family/Visits/2000-07-29\n"
b
--
B Bruen <adamnt42 at ...3379... (sort of)>
More information about the User
mailing list