Programming
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Programming
On pages 22 and 23, Section 14.1 of this file are calculations for 7 different cases. Each case has a boolean expression to satisfy. I need to create some kind of loop that will start with the expression for case 1 and if that is satisfied return case = case 1. If case 1 doesnt satisfy the expression i need to look at case 2 and if that works return case = case 2 an dif not continue to case 3. I need the loop to follow this logic to find the first expression that is satisfied and return that case or go until it reaches case 7. Any help would be appreciated. Thanks.
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
David DePolo wrote:
On pages 22 and 23, Section 14.1 of this file are calculations for 7 different cases. Each case has a boolean expression to satisfy. I need to create some kind of loop that will start with the expression for case 1 and if that is satisfied return case = case 1. If case 1 doesnt satisfy the expression i need to look at case 2 and if that works return case = case 2 an dif not continue to case 3. I need the loop to follow this logic to find the first expression that is satisfied and return that case or go until it reaches case 7. Any help would be appreciated. Thanks.
Many ways of skinning this particular cat.
On the assumption that you wish to retain the look and style of the section, see attached. There are a few other alternative approaches given as well.
Stuart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Sounds like a good use of the "while" loop in a program. Do the case calculations in the loop until your criterion is satisfied. Update the case number in the loop, and then the final case number will be sent to the output variables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
David DePolo wrote:
On pages 22 and 23, Section 14.1 of this file are calculations for 7 different cases. Each case has a boolean expression to satisfy. I need to create some kind of loop that will start with the expression for case 1 and if that is satisfied return case = case 1. If case 1 doesnt satisfy the expression i need to look at case 2 and if that works return case = case 2 an dif not continue to case 3. I need the loop to follow this logic to find the first expression that is satisfied and return that case or go until it reaches case 7. Any help would be appreciated. Thanks.
Many ways of skinning this particular cat.
On the assumption that you wish to retain the look and style of the section, see attached. There are a few other alternative approaches given as well.
Stuart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Stuart thank you very much for the examples. I chose to use the last vector solution which really simplified the calculations. Thanks again for such a quick detailed response.
Dave
