4D View v14PV Ajouter format |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D View v14
PV Ajouter format
|
PV Ajouter format ( zone ; chaîne ) -> Résultat | ||||||||
Paramètre | Type | Description | ||||||
zone | Entier long |
![]() |
Zone 4D View | |||||
chaîne | Chaîne |
![]() |
Chaîne du format | |||||
Résultat | Entier long |
![]() |
Numéro du format | |||||
La commande PV Ajouter format associe le format chaîne à la zone et retourne son identifiant unique.
Si chaîne existe déjà, la commande PV Ajouter format retourne son identifiant (ce numéro peut également être obtenu par la commande PV LIRE LISTE FORMATS).
Nous souhaitons supprimer le format monétaire américain disponible pour notre zone, mais également nous assurer de la présence du format monétaire européen (Euros).
C_ALPHA(255;$FormatAncien) `Chaîne du format à enlever pour la Zone
C_ALPHA(255;$FormatNouveau) `Chaîne du format à ajouter pour la Zone
TABLEAU ENTIER LONG($TabNumFormats;0) `Tableau des numéros de formats
TABLEAU ALPHA(255;$TabChainesFormats;0) `Tableau des chaînes de formats
C_ENTIER($Position) `Position du format à enlever dans les tableaux de numéros et de noms
$FormatAncien:="$###,##0.00"
$FormatNouveau:="### ##0,00 EUR"
PV LIRE LISTE FORMATS(Zone;$TabNumFormats;$TabChainesFormats) `Liste des formats disponibles
$Position:=Chercher dans tableau($TabChainesFormats;$FormatAncien)
Si($Position#-1) `Format à enlever présent dans la zone?
PV SUPPRIMER FORMAT(Zone;$TabNumFormats{$Position}) `Supprimons-le
Fin de si
`Format à ajouter indisponible pour la zone ?
Si(Chercher dans tableau($TabChainesFormats;$FormatNouveau)=-1)
$Position:=Taille tableau($TabChainesFormats)+1 `Nous allons l'ajouter
INSERER DANS TABLEAU($TabChainesFormats;$Position) `Redimensionnement...
INSERER DANS TABLEAU($TabNumFormats;$Position) `...des tableaux
$TabChainesFormats{$Position}:=$FormatNouveau `Affectation du nouveau format
$TabNumFormats{$Position}:=PV Ajouter format(Zone;$FormatNouveau) `Affectation du numéro
Fin de si
Produit : 4D View
Thème : PV Style
Numéro :
15884
Nom intl. : PV Add format
Créé : 4D View 6.8
PV LIRE LISTE FORMATS
PV SUPPRIMER FORMAT
4D View - Langage ( 4D View v11.4)
4D View - Langage ( 4D View v12)
4D View - Langage ( 4D View v14)
4D View - Langage ( 4D v13)
4D View - Langage ( 4D View v14 R2)
4D View - Langage ( 4D View v14 R3)
4D View - Langage ( 4D View v14 R4)