- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hai,
Can anyone justify what the different between two line codes below: 1) case cycle is when 0l1l7 =>cp<=SXT(bm,11)+b3; end case 2) if cycle=2 or cycle=3 then cm<=SXT(b2,11)-b3; end if I'm curious the function of "l". Is it it mean by "AND" function? Thanks in advanceLink Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
| in this context is just to combine several cases in one line and avoid repeating some code.when 0|1|7 =>cp<=SXT(bm,11)+b3;
is equivalent towhen 0 => cp<=SXT(bm,11)+b3;
when 1 => cp<=SXT(bm,11)+b3;
when 7 => cp<=SXT(bm,11)+b3;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
IIRC, | can only be used in case statements or in with..select statements. It is not an "or" operator.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hai Daixiwen and Tricky,
Thanks for your explanations. I understand now, very appreciates. :)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page