← 都来码 / Dolaima← 例程索引pascal/school/lesson19.pas 原文

pascal/school/lesson19.pas · 378 字节 · 下载原文

program chooseNextLeader;
uses randomness; // imports unit

var
    random: Integer;
begin
  WriteLn('Next leader: no. ', getRandomNumber());
  // importing a unit makes all identifiers in the interface 
  // of the unit available to us, as if they are part of our
  // code

  // random := randomness.getRandomNumber();
  // namespacing can also be used to identify units
end.