python-plus-plus/examples/weekday.ppp

21 lines
415 B
Plaintext

enum Weekday {
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday,
Sunday
}
day: Weekday = Weekday.Monday;
match day {
case Monday print("It's Monday!\n");
case Tuesday print("It's Tuesday!\n");
case Wednesday print("It's Wednesday!\n");
case Thursday print("It's Thursday!\n");
case Friday print("It's Friday!\n");
case Saturday print("It's Saturday!\n");
case Sunday print("It's Sunday!\n");
}