pascalabcnet/CodeExamples/Patterns/patterns-simple-const.pas
Александр Погорелов 314ee3b8be Simple tuple and const matching code examples
2019-04-05 14:08:09 +03:00

8 lines
253 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.

begin
var a := 3.14;
match a with
1.0, 2.0, 3.0: Println(1); // Надо исправить: double не матчит с integer - несоответствие типов.
3.13, 3.14, 3.15, 3.16: print(2);
123.0: print(3);
end;
end.