Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 9825acea20b8c1730a908ceb6b6baa6d > files > 8

fpc-doc-3.0.4-6.mga7.armv7hl.rpm

program showcds;

{$mode objfpc}
{$h+}

uses cdrom,sysutils;

Var
  Drives : Array[1..10] of String;
  I,Count : Integer;

begin
  Try
    Count:=GetCDRomDevices(Drives);
    Writeln('This PC has ',count,' CD-ROM drives');
    For I:=1 to count do
      Writeln('Drive ',i,' on device: ',Drives[i]);
  Except
    On E : exception do
      Writeln(E.ClassName,' exception caught with message: ',E.Message);
  end;
end.