FlexPro
HistoryBase
Ingénierie
Formation
Téléchargements
Assistance FlexPro
Connaissance
Communauté
À propos de nous
Références
Emplois
Contact général
Liste des revendeurs
Assistance FlexPro
FR
DE
EN
Porte-plaquette
Produits et solutions
Support et téléchargements
Entreprise
Magazine
Contact
Langue
MyWeisang

Paramètres du compte.

Topic

String as a signal name in a FPScript formula

Page d'accueil ' Communauté ' FPScript ' Chaîne comme nom de signal dans une formule FPScript

Voir les messages de 3 - 1 à 3 (sur un total de 3)
  • Auteur
    Messages
  • #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
    Participant

    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.

Voir les messages de 3 - 1 à 3 (sur un total de 3)
  • Vous devez être connecté pour répondre à ce sujet.