Dokumentation
GetValueFormattedEx
Benötigt: Symcon >= 5.5
string GetValueFormattedEx (int $VariablenID, mixed $Wert)
Parameterliste
| VariablenID | ID der Variable |
| Wert | Wert, welcher formatiert werden soll |
Rückgabewert
Wert passend zur Darstellung bzw. zum Profil der Variable formatiert
Beschreibung
Die Funktion liefert als Ergebnis den Wert Wert, nachdem er passend zur Darstellung bzw. zum Variablenprofil der Variable mit der ID VariablenID formatiert wurde. Der tatsächliche Wert der Variable mit der ID VariablenID ist dabei unerheblich. Der zurückgelieferte Variablentyp ist durch die Formatierung immer String.
Beispiel
echo GetValueFormattedEx(12345, true); //Profil = ~Switch
//Ergibt: An
echo GetValueFormattedEx(23456, 17.5); //Profil = ~Temperature
//Ergibt: 17,5 °C