FlexPro
HistoryBase
Engineering
Training
Downloads
FlexPro Support
Knowledge
Community
About us
References
Jobs
General Contact
List Of Retailers
FlexPro Support
EN
DE
FR
Placeholder
Products and Solutions
Support and Downloads
Company
Magazine
Contact Us
Language
MyWeisang

Account settings

Topic

How to continue a “For Each Value” Loop in FPScript?

Home page Community FPScript How to continue a “For Each Value” Loop in FPScript?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #33554
    Sven Wick
    Participant

    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]

    #33556
    Sven Wick
    Participant

    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_MIN And CURRENT_TEMP < RANGE_MAX Then

    // Do nothing. Just get the next value

    End

    // …

    End
    [/code]

    #33555
    Bernhard Kantz
    Participant

    The 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 = 800

    For 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]

    Support@weisang.com

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.