Topic
How to continue a “For Each Value” Loop in FPScript?
- This topic has 2 replies and 2 voices and was last updated 11 years, 9 months ago ago by Sven Wick.
-
AuthorPosts
-
31.07.2013 at 17:36 #33554Sven WickParticipant
Hi,
here is a snippet from one of our Python scripts,
which I would like to port to FPScript.[code]
…
import fileinput
for line in fileinput.input():
if not CURRENT_TEMP > RANGE_MIN and CURRENT_TEMP < RANGE_MAX: continue ... [/code] It seems, there is no way in FPScript to just skip to the next iteration. I would like to do something like this: [code] For Each Value CURRENT_TEMP In MessdatenT_MWE_2 Do If Not CURRENT_TEMP > RANGE_MIN And CURRENT_TEMP < RANGE_MAX Then // Do nothing. Just get the next value End // ... End [/code]
31.07.2013 at 17:36 #33556Sven WickParticipantHi,
here is a snippet from one of our Python scripts,
which I would like to port to FPScript.[code]
…
import fileinput
for line in fileinput.input():
if not CURRENT_TEMP > RANGE_MIN and CURRENT_TEMP RANGE_MIN And CURRENT_TEMP < RANGE_MAX Then
// Do nothing. Just get the next value
End
// …
End
[/code]06.08.2013 at 08:51 #33555Bernhard KantzParticipantThe following code should work. But should avoid such loops and use the Event Isolation Analysis object.
[code]
Dim CURRENT_TEMP
Dim RANGE_MIN = 600
Dim RANGE_MAX = 800For Each Value CURRENT_TEMP In T_MWE_2 Do
If Not (CURRENT_TEMP > RANGE_MIN And CURRENT_TEMP < RANGE_MAX) Then
// Do nothing. Just get the next value
End
// …
End
[/code] -
AuthorPosts
- You must be logged in to reply to this topic.