main module set7 use TEXTIO declare // enumerations day is [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday, X8, X9, X10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33] weekday is day range monday..friday weekend is day range saturday..sunday // sets days is set of day days_of_week is set of weekday days_of_weekend is set of weekend play_days : days initially days (saturday,sunday) payday : days initially days (friday) work_days : days initially days (monday,tuesday,wednesday,thursday,friday) classday = days (monday, wednesday, friday) beer_day : days sober_day : days enddeclare Play_days := classday + payday %if false Beer_day := play_days * payday Sober_day := work_days - beer_day for this_day in play_days do out_integer (TTY, integer(this_day), "Play_days") out_record (TTY) endfor for this_day in Beer_day do out_integer (TTY, integer(this_day), "beer_day") out_record (TTY) endfor for this_day in sober_day do out_integer (TTY, integer(this_day), "sober_day") out_record (TTY) endfor %endif %if false /// for this_day in day do declare (temp_days : days initially days(this_day)) // if temp_days <= days_of_week do // out_string (TTY, "weekday") // otherwise // out_string (TTY, "weekend") // endif out_record (TTY) endfor %endif endmodule