This repository has been archived on 2024-12-25. You can view files and clone it, but cannot push or open issues or pull requests.
2024-03-10 20:32:51 +03:00

12 lines
712 B
ObjectPascal
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Иллюстрация поиска имен вначале справа налево в секции uses, а затем в системном модуле PABCSystem
uses System;
begin
// Имя Random, определенное в пространстве имен System, перекрывает имя Random
// в модуле PABCSystem, который неявно подключается первым
var r: Random := new Random();
writeln(r.Next(10));
// Именно поэтому перед данным Random необходимо явно указывать имя модуля, в котором он находится
var i: integer := PABCSystem.Random(10);
writeln(i);
end.