pascalabcnet/CodeExamples/Patterns/patterns-simple-tuple.pas

7 lines
146 B
ObjectPascal
Raw Permalink Normal View History

begin
match (1, 2, 'string') with
2019-05-23 10:37:16 +03:00
(1, _, var x): Println(x);
(1, _, 'strin'): print(2);
2019-05-23 10:37:16 +03:00
(_, _, 'string'): print(3);
end;
end.