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
- Ce sujet contient 2 réponses, 2 participants et a été mis à jour pour la dernière fois par jasmina.zlender@erl16.siemens.de, le il y a 21 années et 4 mois.
-
AuteurMessages
-
12.01.2004 à 22:20 #33408jasmina.zlender@erl16.siemens.deParticipant
There is a string in a FlexPro formula. How to call a signal that has the same name as the value of a string?
12.01.2004 à 22:33 #33406jasmina.zlender@erl16.siemens.deParticipantThere is a string in a FlexPro formula. How to call a signal that has the same name as the value of a string?
12.01.2004 à 22:33 #33407Bernhard KantzParticipantDo 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. -
AuteurMessages
- Vous devez être connecté pour répondre à ce sujet.