techy5025
Newbie level 4
- Joined
- Mar 3, 2020
- Messages
- 7
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Location
- Orlando, Fla
- Activity points
- 62
I am using an if statement with multiple conditionals. Is there a shortcut way to write this as the "year_rt" is the same in each case .. but the condition is different. This is used in a string of "if" statements that doesn't lend itself well to using the "case" statement.
Thanks,
Jim
Code:
if ((year_rt == 06) || (year_rt == 17) || (year_rt == 23))
begin
calendar <= 1; // Month starts on Sunday
leap <= 0; // .. no leap year
end
Thanks,
Jim