FlexPro
HistoryBase
Engineering
Training
Downloads
FlexPro-Support
Wissen
Community
Über Uns
Referenzen
Jobs
Allgemeiner Kontakt
Händlerverzeichnis
FlexPro-Support
DE
EN
FR
Placeholder
Produkte und Lösungen
Support und Downloads
Unternehmen
Magazin
Kontakt
Sprache
MyWeisang

Account Einstellungen

Topic

String as a signal name in a FPScript formula

Startseite ' Community ' FPScript ' String as a signal name in a FPScript formula

Anzeigen von 3-Stellen - 1 bis 3 (von insgesamt 3)
  • Autor
    Beiträge
  • #33408

    There is a string in a FlexPro formula. How to call a signal that has the same name as the value of a string?

    #33406

    There is a string in a FlexPro formula. How to call a signal that has the same name as the value of a string?

    #33407
    Bernhard Kantz
    Teilnehmer

    Do do that, you need to use the FPScript “Indirection” operator [b]$[/b]”String”[b]$[/b]. E g.:
    [code]
    $”DataSignal1″$ // equal to DataSignal1
    [/code]
    [b]Note[/b] that the backslash characters have to be doubled because the backslash is the escape character in FPScript strings!

    You can use the indirection op to call functions also:
    [code]
    $”sin”$(1) // equal to sin(1)
    [/code]
    Note that instead of literally specifying the string it is of course possible to use a variable which contains the string.

Anzeigen von 3-Stellen - 1 bis 3 (von insgesamt 3)
  • Du musst angemeldet sein, um auf dieses Thema antworten zu können.