4D View v16PV Add format |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D View v16
PV Add format
|
PV Add format ( Bereich ; String ) -> Funktionsergebnis | ||||||||
Parameter | Typ | Beschreibung | ||||||
Bereich | Lange Ganzzahl |
![]() |
4D View Bereich | |||||
String | String |
![]() |
String für Format | |||||
Funktionsergebnis | Lange Ganzzahl |
![]() |
Formatnummer | |||||
Die Funktion PV Add format fügt in Bereich das Format String hinzu und gibt seine Nummer zurück.
Ist String bereits vorhanden, gibt die Funktion PV Add format diese Nummer zurück. Diese Nummer erhalten Sie auch über den Befehl PV GET FORMAT LIST.
Im aktiven Bereich soll das amerikanische Währungsformat entfernt werden, es soll jedoch sichergestellt werden, dass das europäische Währungsformat weiterhin verfügbar ist.
C_TEXT($OldFormat) `Format, das aus Bereich entfernt werden soll
C_TEXT($NewFormat) `Format, das in Bereich hinzugefügt werden soll
ARRAY LONGINT($FormatNumArray;0) `Array mit Formatnummern
ARRAY TEXT($FormatStringArray;0) `Array mit Format Strings
C_LONGINT($Position) `Position des zu entfernenden Formats in Arrays Nummer und Name
$OldFormat:="$###,##0.00"
$NewFormat:="### ##0,00 EUR"
PV GET FORMAT LIST(Bereich;$FormatNumArray;$FormatStringArray)
`Liste verfügbarer Formate
$Position:=Find in array($FormatStringArray;$OldFormat)
If($Position#-1) `Altes Format im Bereich vorhanden?
PV REMOVE FORMAT(Bereich;$FormatNumArray{$Position}) `Entfernen
End if
`In Bereich nicht vorhandenes Format hinzufügen?
If(Find in array($FormatStringArray;$NewFormat)=-1)
$Position:=Size of array($FormatStringArray)+1 `Hinzufügen
INSERT IN ARRAY($FormatStringArray;$Position) `Arrays...
INSERT IN ARRAY($FormatNumArray;$Position) `...anpassen
$FormatStringArray{$Position}:=$NewFormat `Neues Format zuweisen
$FormatNumArray{$Position}:=PV Add format(Bereich;$NewFormat)
`Nummer zuweisen
End if
Produkt: 4D View
Thema: PV Stil
Nummer:
15884
Erstellt: 4D View 6.8
4D View Programmiersprache ( 4D View v16)