1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
program HelloWold; { 列挙型: 定数のリスト } type colors = (red, green, blue); var mycolor: colors; begin // mycolor := green; // mycolor := yellow; // writeln(mycolor); writeln(succ(green)); // blue writeln(pred(green)); // red writeln(ord(green)); // 1 writeln(succ('b')); // 'c' end.
You can clone a snippet to your computer for local editing. Learn more.