pascalabcnet/InstallerSamples/LanguageFeatures/ParamsWriteln.pas

17 lines
334 B
ObjectPascal
Raw Permalink 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.

// Создание процедуры MyWriteln с переменным числом параметров
procedure MyWriteln(params args: array of object);
begin
foreach var x in args do
Write(x);
WriteLn;
end;
var
a: integer := 777;
b: boolean := True;
r: real := 3.1415;
begin
MyWriteln(a,' ',b,' ',r);
end.