4D View v14PV Add format |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D View v14
PV Add format
|
PV Add format ( area ; string ) -> 戻り値 | ||||||||
引数 | 型 | 説明 | ||||||
area | 倍長整数 |
![]() |
4D View エリア | |||||
string | 文字 |
![]() |
フォーマットの文字列 | |||||
戻り値 | 倍長整数 |
![]() |
フォーマットID | |||||
PV Add formatコマンドは、フォーマットのstring をarea に追加し、そのID を返します。
string が既に存在する場合、PV Add formatはそのID を返します(この番号はPV GET FORMAT LISTコマンドを使用して取得することもできます)。
アクティブなエリアで使用可能なアメリカ通貨フォーマットを削除しますが、ヨーロッパ通貨フォーマット(ユーロ)は使用可能なままにしておきます。
C_STRING(255;$OldFormat) `エリアから削除するフォーマット文字列
C_STRING(255;$NewFormat) `エリアに追加するフォーマット文字列
ARRAY LONGINT($FormatNumArray;0) `フォーマット番号の配列
ARRAY STRING(255;$FormatStringArray;0) `フォーマット文字列の配列
C_INTEGER($Position) `番号配列と文字列配列内における削除対象フォーマットの位置
$OldFormat:="$###,##0.00"
$NewFormat:="### ##0,00 EUR"
PV GET FORMAT LIST(Area;$FormatNumArray;$FormatStringArray) `利用可能なフォーマットのリスト
$Position:=Find in array($FormatStringArray;$OldFormat)
If($Position#-1) `削除対象のフォーマットがエリアに存在するか?
PV REMOVE FORMAT(Area;$FormatNumArray{$Position}) `これを削除する
End if
`追加するフォーマットはエリアで利用できない?
If(Find in array($FormatStringArray;$NewFormat)=-1)
$Position:=Size of array($FormatStringArray)+1 `これを追加する
INSERT IN ARRAY($FormatStringArray;$Position) `配列をリサイズする
INSERT IN ARRAY($FormatNumArray;$Position)
$FormatStringArray{$Position}:=$NewFormat `フォーマットを代入
$FormatNumArray{$Position}:=PV Add format(Area;$NewFormat) `番号を代入
End if
プロダクト: 4D View
テーマ: PVスタイル
番号:
15884
初出: 4D View 6.8
PV GET FORMAT LIST
PV REMOVE FORMAT
4D View ( 4D View v11.4)
4D View ( 4D View v12)
4D View ( 4D View v14)
4D View ( 4D v13)
4D View ( 4D View v14 R2)
4D View ( 4D View v14 R3)
4D View ( 4D View v14 R4)