Unix/ls: Difference between revisions

Unix/ls en FreeBASIC
No edit summary
(Unix/ls en FreeBASIC)
Line 636:
 
As for the ordering of results, on this Windows XP system, the file names came out ordered so there is no need to mess about with a storage area to sort the names in.
 
 
=={{header|FreeBASIC}}==
<lang freebasic>#include "dir.bi"
 
Sub ls(Byref filespec As String, Byval attrib As Integer)
Dim As String filename = Dir(filespec, attrib)
Do While Len(filename) > 0
Print filename
filename = Dir()
Loop
End Sub
 
Dim As String directory = "" ' Current directory
ls(directory & "*", fbDirectory)
Sleep</lang>
 
 
=={{header|FunL}}==
2,130

edits