dadllcommonDLL 使用法 ライブラリ: dadllcommon このライブラリには、他のより特定的なライブラリには属さない共通の機能が含まれています。 特に指定がない場合は、パラメータの受け渡しには以下のフォーマットを使用します。次の返値を予測することができます。 table : ppmmmnnn tablefield: ppmmmnnn.ccccccccc domain : ppcccccccccccc DLL プロトタイプ function extern convert.char.to.new.line(ref string text.line())
前 : true
後 : text.line の中のすべての ASCII 文字は、ASCII 文字 255 で置き換えられています。
function extern convert.new.line.to.char(ref string text.line())
前 : true
後 : text.line の中のすべての改行文字は、ASCII 文字 255 で置き換えられています。
function extern display.mess(const string msg())
前 : true
後 : msg は進捗ウィンドウ内の user_message 部に表示されます。ウィンドウの user_message 部は、最大 72 文字を含むことができます。
説明 : 関数 display.xch.progress() の DLL 使用法を参照してください。
function extern display.xch.progress(
domain daxch.txch xch.type,
const domain daxch.cxch xch.scheme,
const domain daxch.cbat batch,
domain daxch.batl batchline,
const domain daxch.ttbl triton.table,
const domain daxch.casf ASCII.file,
long run.num,
long try.num,
const string filename(),
long no.read,
long no.processed,
long no.error.rejected,
long no.cond.rejected,
long no.skipped)
前 : true
後 : 渡された引数の情報がウィンドウに表示されます。
説明 : ウィンドウ表示は下に示すようになります。
+------------------------FFFFFF交換タイプFFFFFF-------------------+
| 交換スキーム: FFFF レコードを読み込み |
| バッチ : FFFF レコードを処理済み : FFFF |
| |
| バッチ行 : FF レコードをエラーにより拒否: FFFF |
| |
| テーブル : FFFF レコードを条件により拒否: FFFF |
| |
| ASCII ファイル : FFFF レコードを処理せずスキップ: FFFF |
| |
| 実行/試行番号 : FF/FF |
| |
| ファイル : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF |
| |
| FFFFFFFFFFFFFFuser_messageFFFFFFFFFFFFFF |
+---------------------------------------------------------------+
function extern long domain.exists(const string domain.name())
前 : true
返値: <domain.name> は既存のドメインかどうか。
function extern long field.exists(
const domain daxch.ttbl table.name,
const domain daxch.tfld field.name,
[ ref string domain.name() ],
[ ref long field.type ],
[ ref long field.flag ],
[ ref long field.depth ])
前 : field.name の書式はテーブルを含みません。
返値: <field.name> が、テーブル <table.name> に存在しているフィールドかどうか (それが結合フィールドなら、false が返ります)
後 : true が返されて、オプションの引数 (複数の場合もあり) には、そのフィールドの値が入っています。
function extern long generate.unique.key()
前 : true
返値: この関数では一意な値が返されます。同じ値が返されることは決してありません。
function extern string get.index.field.name(
const string tble(),
long index.no,
long part.no )
前 : index.no > 0
返値: テーブル <tble> のインデックス <index.no> にある <part.no> 番目のフィールドの名前。<tble> が存在しない、<tble> にインデックス <index.no> がない、あるいはインデックス <index.no> にあるフィールドの数が <part.no> 個未満であるといった場合には、空の文字列が返されます。
このデータ辞書は関数 rdi を使用して読み込まれるので、ユーザの現在のパッケージコンビネーションと一致します。
function extern string get.separator(
const domain daxch.cxch xch.scheme )
前 : true
返値: xch.scheme が存在 ==> sepa.to.sepa.char (daxch001.ctrl,daxch001.sepa) それ以外 ==> ""
状況 : daxch001 の現在のレコードは変更されません。
function extern long index.exists(
const domain daxch.ttbl table.name,
long index.no,
[ ref long no.parts ],
[ ref long duplicate ] )
前 : true
返値: テーブル <table.name> にインデックス <index.no> 番があるか。
後 : true が返された場合、no.parts (指定している場合) にはインデックスに含まれるフィールドの数が入り、duplicate (指定している場合) は、重複が許容されるかどうかを示します。
function extern long is.index.field(
const string tble(),
long index.no,
string field.name(18) fixed )
前 : index.no > 0
返値: フィールド <field.name> がテーブル <tble> のインデックス <index.no> に属するかどうか。
function extern long is.numeric.constant(const string str())
返値: str に長定数値または浮動小数点値 (科学的表記の可能性あり) が入る場合にのみ、true。
function extern long is.text.buffer.field(const string field.name())
前 : true
返値: <field.name> が "tttxt010.text" または "tttxt015.text" のどちらであるか。
説明 : この関数は、フィールドに改行文字が含まれているかを判別するために使用されます (通常は、テーブルフィールド tttxt010.text に改行文字が格納されます)。
function extern long is.text.field(const string field.name())
前 : true
返値: フィールド <field.name> が tttxt???.ctxt フィールドの 1 つかどうか。
function extern justify.and.convert.string(
ref string string.value() mb,
const string string.domain())
前 : string.domain は既存の文字列ドメインです。
後 : string.value は、以下のいずれかです。
- 左寄せ、右寄せ、中央寄せ
- 大文字または小文字に変換
- ドメイン string.domain での定義に従ってドメイン長で切り詰め
function extern long language.exists(string lang(1))
前 : true
返値: <lang> が既存の言語かどうか。
function extern string make.string.const(const string str())
前 : true
返値 : ダイナミック sql または生成されたスクリプトなどのリテラルコードで使用できるよう、文字列定数に変換された str
例:
- str が二重引用符 (") で挟まれている
- str 自身に含まれる二重引用符は、2 つの二重引用符 ("") で置き換えられる
- str の前後に半角スペース (複数可) がある場合、それらは削除されない
function extern remove.xch.progress()
前 : display.xch.progress() または display.mess() が先に呼び出されている必要があります。
後 : display.xch.progress および display.mess に使用されたウィンドウが削除されます。
function extern string replace(
domain daxch.str stri,
const string pattern(),
const string repl() )
前 : pattern <> ""
返値: stri 内のすべての pattern が repl 文字列で置き換えられています。
文字列の長さは、ドメイン daxch.str の長さを越えてはいけません。
function extern sepa.string.to.sepa(
const string sepa.string(),
ref domain daxch.yesno ctrl,
ref domain daxch.sepa sepa )
前 : valid.separator.string(sepa.string)
後 :
isspace(sepa.string) の場合: ctrl = no および sepa = ""
len(sepa.string) = 1 の場合: ctrl = no および sepa = sepa.string
(sepa.string) = 2 の場合: ctrl = yes および sepa = sepa.string(2)
function extern string sepa.to.sepa.char(
domain daxch.yesno ctrl,
domain daxch.sepa sepa )
前 : valid.separator(ctrl, sepa)
返値:
ctrl = no の場合: sepa
ctrl = yes の場合: <Ctrl> sepa と対応する ASCII 文字
function extern long size.of(const string domain.name())
前 : domain.name はタイプ文字列のドメイン
返値: ドメインの長さ
function extern long table.exists(const domain daxch.ttbl table.name)
前 : true
返値: テーブル <table.name> が既存のテーブルかどうか。
function extern long valid.separator(
domain daxch.yesno ctrl,
domain daxch.sepa sepa )
前: true
返値: ctrl と sepa で有効な区切りが構成される場合にのみ true。
例:
- ctrl = no で、sepa が {, 0--9, A--Z} に含まれない場合
- ctrl = yes で、sepa が {A--Z, [, \, ], ^} に含まれる場合
function extern long valid.separator.string(const string sepa.string())
前 : true
返値: sepa.string が有効な区切りの場合にのみ true。
例:
- isspace(sepa.string)
- len(sepa.string) = 1 および valid.separator (no, sepa.string)
- len(sepa.string) = 2 および sepa.string(1;1)
= "^" および valid.separator (yes, sepa.string(2)
| |||