Computer Science Canada

CD Music

Author:  PHP God [ Tue Jul 22, 2003 1:58 pm ]
Post subject:  CD Music

can turing detect what the last track number on a cd is?

Author:  Dan [ Tue Jul 22, 2003 4:19 pm ]
Post subject: 

i think there was another post about this. i bivle you can used the Dir comands to find this out if you know the cd drivers name.

ex.

code:

var cdDrive : string := "d:"
var fileName : string
var streamNumber : int := Dir.Open (cdDrive)
var numOfFiles : int := 0

loop
    fileName := Dir.Get (streamNumber)
    exit when fileName = ""

    if fileName not= "." and fileName not= ".." then
        numOfFiles += 1
    end if
end loop


put "There are ", numOfFiles, " files in ", cdDrive

Author:  JayLo [ Tue Jul 22, 2003 11:58 pm ]
Post subject: 

http://www.compsci.ca/bbs/viewtopic.php?t=190


: