Topic
Variable in signal path
Página de inicio ' Community ' FPScript ' Variable en la ruta de la señal
- Este tema contiene Respuesta 1, Voces 2, y fue actualizado por última vez el Hace 8 años, 6 meses por Bernhard Kantz.
Viendo los mensajes de 2 - 1 a 2 (de 2 en total)
-
AutorPuestos
-
27.07.2017 en 16:36 #33632HerveM1234Participante
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 en 09:54 #33633Bernhard KantzKeymasterYou 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.
-
AutorPuestos
Viendo los mensajes de 2 - 1 a 2 (de 2 en total)
- Debes estar registrado para responder a este tema.