[Gambas-user] SHELL is more faster than SUB Process_Read()
Demosthenes Koptsis
demosthenesk at ...626...
Sun Aug 15 20:51:38 CEST 2010
Hi i wrote a test program that "ls -1" a directory with 1700 and more files
(mp3).
i wanted to make a string as following
Content = "/mnt/store/MUSIC/free/new age/webradio recs/Trancemission.FM
Radio 128K- New Age 2- new experience of meditation and new age music -
livestream 128k/" & sLine
in order to list with full path the files.
but i dont get the wanted result.
The SHELL command runs faster than Process_Read.
This mess up the result of concatenation.
The code is the following:
--------------------------------------------------------------------------------
' Gambas class file
PUBLIC SUB Button1_Click()
SHELL "ls -1 \'/mnt/store/MUSIC/free/new age/webradio
recs/Trancemission.FM Radio 128K- New Age 2- new experience of meditation
and new age music - livestream 128k/\'" FOR READ
END
PUBLIC SUB Process_Read()
DIM sLine AS String
DIM Content AS String
' IF Eof(LAST) THEN RETURN
READ #LAST, sLine
Content = "/mnt/store/MUSIC/free/new age/webradio recs/Trancemission.FM
Radio 128K- New Age 2- new experience of meditation and new age music -
livestream 128k/" & sLine
PRINT Content;
CATCH
Message("Error code " & Error.Code & " Error message " & Error.Text)
END
--------------------------------------------------------------------------------
Also i get EOF but the PRINT still runs in background.
Is this behavior normal?
--
Γεια χαρα σε όλους!!!
Regards,
Demosthenes Koptsis
More information about the User
mailing list