Snippets

markdiary eeBA: Untitled snippet

Created by markdiary
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.

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.