09-27-2006 07:00 PM
09-27-2006 08:22 PM
09-28-2006 12:26 AM
09-28-2006 10:12 AM
Linefeeds (try ctrl-enter) can make it easier to read. Also, there is no need to repeat the assignment:
Locals.StartMarker =
(RunState.Sequence.Setup["Identify Limits to Use"].Result.ButtonHit == 1) ? "Commercial Grade Specifications" :
(RunState.Sequence.Setup["Identify Limits to Use"].Result.ButtonHit == 2) ? "Military Grade Specifications" :
"My Grade Specifications"
A local variable can make it easier to read, especially if there are a lot of cases:
Locals.buttonHit = RunState.Sequence.Setup["Identify Limits to Use"].Result.ButtonHit,
Locals.StartMarker =
(Locals.buttonHit == 1) ? "Commercial Grade Specifications" :
(Locals.buttonHit== 2) ? "Military Grade Specifications" :
"My Grade Specifications"
An lookup table array can also make it simpler:
Locals.StartMarker = Locals.MyMarkers[RunState.Sequence.Setup["Identify Limits to Use"].Result.ButtonHit]
(note, I didn't actually test these, so they might need some slight adjustment).
09-28-2006 01:32 PM