Topic
Variable in signal path
Startseite ' Community ' FPScript ' Variable in signal path
- Dieses Thema hat 1 Antwort sowie 2 Teilnehmer und wurde zuletzt vor vor 7 Jahren, 9 Monaten von Bernhard Kantz aktualisiert.
Anzeigen von 2-Stellen - 1 bis 2 (von insgesamt 2)
-
AutorBeiträge
-
27.07.2017 um 16:36 Uhr #33632HerveM1234Teilnehmer
Hi,
I would like to use a variable instead of the path name when calling a function.
ie :
Result = MyFunction(‘FolderASignal1’)
works fine
but
Dim Fld = “FolderA”
Result = MyFunction(Fld :: Signal1)
doesn’t work –> syntax problem
Thanks for Help
28.07.2017 um 09:54 Uhr #33633Bernhard KantzTeilnehmerYou can use the indirection operator $string-expression$ to access an FlexPro object from its (path) name given as a string:
Dim Fld = "FolderA\" $Fld : "Signal1"$
accesses the object ‘Signal1’ in ‘FolderA’ relative to the path of the formula containing the expression. Note the double backslash, it is necessary because the acts as escape character.
-
AutorBeiträge
Anzeigen von 2-Stellen - 1 bis 2 (von insgesamt 2)
- Du musst angemeldet sein, um auf dieses Thema antworten zu können.