home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1996 February
/
VPR9602A.ISO
/
fwindows
/
archive
/
exds100.lzh
/
SPACK.LZH
/
EXCEED.FRM
< prev
next >
Wrap
Text File
|
1995-09-30
|
18KB
|
567 lines
VERSION 2.00
Begin Form Func4
BackColor = &H00C0C0C0&
Caption = "文字列操作 4関数"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS ゴシック"
FontSize = 12.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 7185
Icon = EXCEED.FRX:0000
Left = 1035
LinkTopic = "Form1"
ScaleHeight = 6735
ScaleWidth = 12750
Top = 1650
Width = 12870
Begin CommandButton QQQ
Caption = "Help"
Height = 375
Index = 1
Left = 9300
TabIndex = 35
Top = 6210
Width = 1545
End
Begin CommandButton Command2
Caption = "実行"
Height = 375
Index = 1
Left = 2340
TabIndex = 33
Top = 5550
Width = 975
End
Begin CommandButton Command2
Caption = "実行"
Height = 375
Index = 0
Left = 2340
TabIndex = 32
Top = 4110
Width = 975
End
Begin CommandButton Command1
Caption = "変換モード"
Height = 465
Left = 5250
TabIndex = 30
Top = 2580
Width = 1095
End
Begin TextBox Text6
BackColor = &H0000FF00&
Height = 555
Index = 1
Left = 3660
TabIndex = 23
Top = 5220
Width = 4935
End
Begin TextBox Text5
BackColor = &H0000FFFF&
Height = 465
Index = 1
Left = 1500
TabIndex = 21
Text = "A"
Top = 5460
Width = 525
End
Begin TextBox Text4
BackColor = &H0000FFFF&
Height = 525
Index = 1
Left = 1500
TabIndex = 20
Text = "安藤A山川XXXX,DDDDDD"
Top = 4620
Width = 7095
End
Begin TextBox Text6
BackColor = &H0000FF00&
Height = 555
Index = 0
Left = 3660
TabIndex = 19
Top = 3840
Width = 4935
End
Begin TextBox Text5
BackColor = &H0000FFFF&
Height = 465
Index = 0
Left = 1500
TabIndex = 17
Text = ","
Top = 4050
Width = 435
End
Begin TextBox Text4
BackColor = &H0000FFFF&
Height = 525
Index = 0
Left = 1500
TabIndex = 16
Text = "AAAA,BBBB,CCCCC,FFFFF+dddddd-GGGGGGG"
Top = 3240
Width = 7095
End
Begin CommandButton CMD
Caption = "実行"
Height = 495
Left = 1500
TabIndex = 12
Top = 2580
Width = 1095
End
Begin TextBox Text3
BackColor = &H0000FFFF&
Height = 495
Left = 1500
TabIndex = 10
Text = "c:\dat\cov\rank\test.inf"
Top = 2010
Width = 7095
End
Begin OptionButton OPT
BackColor = &H00C0C0C0&
Caption = "ブランク区切り"
Height = 375
Index = 1
Left = 6330
TabIndex = 6
Top = 720
Width = 2715
End
Begin OptionButton OPT
BackColor = &H00C0C0C0&
Caption = "カンマ区切り"
Height = 345
Index = 0
Left = 4020
TabIndex = 5
Top = 720
Value = -1 'True
Width = 2715
End
Begin TextBox Text2
BackColor = &H0000FFFF&
Height = 435
Left = 1500
TabIndex = 3
Text = "2"
Top = 720
Width = 375
End
Begin CommandButton QQQ
Caption = "Quit"
Height = 375
Index = 0
Left = 10980
TabIndex = 2
Top = 6210
Width = 1545
End
Begin TextBox Text1
BackColor = &H0000FFFF&
Height = 495
Left = 1500
TabIndex = 1
Text = "aaa,www,ddd,ffffff,gg,hhhh,jj,kkk"
Top = 120
Width = 7065
End
Begin Line Line2
X1 = 1410
X2 = 1410
Y1 = -180
Y2 = 6090
End
Begin Line Line1
Index = 3
X1 = 0
X2 = 12750
Y1 = 4560
Y2 = 4560
End
Begin Line Line1
Index = 2
X1 = 0
X2 = 12750
Y1 = 6060
Y2 = 6060
End
Begin Line Line1
Index = 1
X1 = 0
X2 = 12750
Y1 = 3150
Y2 = 3150
End
Begin Line Line1
Index = 0
X1 = 0
X2 = 12750
Y1 = 1890
Y2 = 1890
End
Begin Label Label11
BackStyle = 0 '透明
Caption = "↑タイトルをクリックすると指定方法が表示されます。"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS ゴシック"
FontSize = 15
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00FF0000&
Height = 345
Left = 120
TabIndex = 34
Top = 6210
Width = 8085
End
Begin Label Label10
BackStyle = 0 '透明
Caption = "無指定"
Height = 315
Left = 6390
TabIndex = 31
Top = 2670
Width = 2145
End
Begin Label Label2
BackStyle = 0 '透明
Caption = "返却値 0:エラー n:返却バイト数"
Height = 345
Index = 4
Left = 9300
TabIndex = 29
Top = 5340
Width = 4185
End
Begin Label Label2
BackStyle = 0 '透明
Caption = "返却値 0:エラー n:返却バイト数"
Height = 345
Index = 3
Left = 9330
TabIndex = 28
Top = 3960
Width = 4185
End
Begin Label Label9
BackColor = &H0000FF00&
BorderStyle = 1 '実線
Height = 465
Left = 8730
TabIndex = 27
Top = 5250
Width = 495
End
Begin Label Label8
BackColor = &H0000FF00&
BorderStyle = 1 '実線
Height = 465
Left = 8730
TabIndex = 26
Top = 3900
Width = 495
End
Begin Label Label7
BackColor = &H0000FF00&
BorderStyle = 1 '実線
Height = 465
Left = 8730
TabIndex = 25
Top = 2610
Width = 495
End
Begin Label Label2
BackStyle = 0 '透明
Caption = "返却値 0:エラー n:返却バイト数"
Height = 345
Index = 2
Left = 9270
TabIndex = 24
Top = 2670
Width = 4185
End
Begin Label Label6
BackStyle = 0 '透明
Caption = "区切り文字"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS ゴシック"
FontSize = 10.5
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 225
Index = 1
Left = 1500
TabIndex = 22
Top = 5220
Width = 1455
End
Begin Label Label6
BackStyle = 0 '透明
Caption = "区切り文字"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS ゴシック"
FontSize = 10.5
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 345
Index = 0
Left = 1500
TabIndex = 18
Top = 3810
Width = 1395
End
Begin Label Label4
BackStyle = 0 '透明
Caption = "(4)Before"
Height = 345
Index = 3
Left = 20
TabIndex = 15
Top = 4650
Width = 1185
End
Begin Label Label4
BackStyle = 0 '透明
Caption = "(3)After"
Height = 345
Index = 2
Left = 20
TabIndex = 14
Top = 3270
Width = 1875
End
Begin Label Label5
BackColor = &H0000FF00&
BorderStyle = 1 '実線
Height = 435
Left = 2730
TabIndex = 13
Top = 2610
Width = 2025
End
Begin Label Label4
BackStyle = 0 '透明
Caption = "(2)Entryname"
Height = 345
Index = 1
Left = 20
TabIndex = 11
Top = 2100
Width = 1875
End
Begin Label Label4
BackStyle = 0 '透明
Caption = "(1)EXtract"
Height = 345
Index = 0
Left = 20
TabIndex = 9
Top = 90
Width = 1875
End
Begin Label Label2
BackStyle = 0 '透明
Caption = "返却値 0:正常 n:以外"
Height = 345
Index = 1
Left = 9330
TabIndex = 8
Top = 1350
Width = 4185
End
Begin Label Label3
BackColor = &H0000FF00&
BorderStyle = 1 '実線
Height = 465
Left = 8730
TabIndex = 7
Top = 1290
Width = 495
End
Begin Label Label2
BackStyle = 0 '透明
Caption = "番目を取り出す"
Height = 315
Index = 0
Left = 1980
TabIndex = 4
Top = 810
Width = 1785
End
Begin Label Label1
BackColor = &H0000FF00&
BorderStyle = 1 '実線
Height = 555
Left = 1500
TabIndex = 0
Top = 1230
Width = 7095
End
End
Option Explicit
Dim entmode As Integer
Sub CMD_Click ()
Dim s1 As String, s2 As String * 256
Dim rt
s1 = text3.Text
rt = entryname%(s1, s2, entmode)
label5.Caption = s2
label7.Caption = Str$(rt)
End Sub
Sub Command1_Click ()
entmode = entmode + 1
If entmode > 2 Then entmode = 0
Select Case entmode
Case 0
label10.Caption = "無指定"
Case 1
label10.Caption = "大文字変換"
Case 2
label10.Caption = "小文字変換"
End Select
End Sub
Sub Command2_Click (Index As Integer)
Dim ibuf As String
Dim obuf As String * 256
Dim key As String
Dim cnt As Integer
Dim kk As Integer
Dim rt
Select Case Index
Case 0
ibuf = text4(0).Text
cnt = Val(ibuf)
key = text5(0).Text
If Len(key) = 0 Then
key = Chr$(32)
End If
rt = after%(ibuf, key, obuf)
label8.Caption = Str$(rt)
text6(0).Text = obuf
Case 1
ibuf = text4(1).Text
cnt = Val(ibuf)
key = text5(1).Text
If Len(key) = 0 Then
key = Chr$(32)
End If
rt = before%(ibuf, key, obuf)
label9.Caption = Str$(rt)
text6(1).Text = obuf
End Select
End Sub
Sub Form_Load ()
entmode = 0
label10.Caption = "無指定"
End Sub
Sub Label4_Click (Index As Integer)
Dim ccc As String
Dim MM As String
ccc = Chr$(13)
Select Case Index
Case 0
MM = MM + "EXtract" + ccc + ccc
MM = MM + " <概要>指定番号の文字列を取り出します。" + ccc + ccc
MM = MM + " <引数>" + ccc
MM = MM + " <1:カンマ2:ブランク> <解析文字列> <取り出し結果文字列領域>" + ccc + ccc
MM = MM + " <注意>" + ccc
MM = MM + " 取り出し結果文字列は256バイト以上の領域を必ず指定して下さい。" + ccc
MM = MM + " DIM OutBuffer As String * 256" + ccc + ccc
MM = MM + " <返却値> 0:正常 0以外はエラーです。" + ccc + ccc
MM = MM + " <特記事項> カンマ指定で DD, A A ,CC 等の文字列で2番目を取り出した場合" + ccc
MM = MM + " 抽出文字列はRTrim LTrim 処理後の状態 'A A' を返却します。" + ccc
MM = MM + " カンマ指定の場合で文字列が漢字ブランクを含んだオールブランクの文字列で" + ccc
MM = MM + " カンマなしを解析対象にした場合はブランク以外の異物を1件発見した" + ccc
MM = MM + " ことになります。"
Case 1
MM = MM + "EntryName" + ccc + ccc
MM = MM + " <概要>ファイルパス名文字列からファイル名自体を取り出します。" + ccc + ccc
MM = MM + " <引数>" + ccc
MM = MM + " <解析文字列> <取り出し結果文字列領域> < 0:そのままの状態" + ccc
MM = MM + " 1:大文字に変換する" + ccc
MM = MM + " 2:小文字に変換する >" + ccc + ccc
MM = MM + " <注意>" + ccc
MM = MM + " 取り出し結果文字列は256バイト以上の領域を必ず指定して下さい。" + ccc
MM = MM + " DIM OutBuffer As String * 256" + ccc
MM = MM + " 解析文字列は256バイト固定にしないこと" + ccc
MM = MM + " DIM InBuffer As String " + ccc + ccc
MM = MM + " <返却値> 0:エラー n:返却した文字列の長さをバイト数で返します。"
Case 2
MM = MM + "After" + ccc + ccc
MM = MM + " <概要>解析対象文字列からキーとなる文字列を境にその後ろ側を返却します。" + ccc + ccc
MM = MM + " <引数>" + ccc
MM = MM + " <解析文字列> <キー文字列> <取り出し結果文字列領域>" + ccc + ccc
MM = MM + " <注意>" + ccc
MM = MM + " 取り出し結果文字列は256バイト以上の領域を必ず指定して下さい。" + ccc
MM = MM + " DIM OutBuffer As String * 256" + ccc
MM = MM + " 解析文字列およびキー文字列は256バイト固定にしないこと" + ccc
MM = MM + " DIM InBuffer As String " + ccc
MM = MM + " DIM KeyStr As String " + ccc + ccc
MM = MM + " <返却値> 0:エラー n:返却した文字列の長さをバイト数で返します。"
Case 3
MM = MM + "Before" + ccc + ccc
MM = MM + " <概要>解析対象文字列からキーとなる文字列を境にその前側を返却します。" + ccc + ccc
MM = MM + " <引数>" + ccc
MM = MM + " <解析文字列> <キー文字列> <取り出し結果文字列領域>" + ccc + ccc
MM = MM + " <注意>" + ccc
MM = MM + " 取り出し結果文字列は256バイト以上の領域を必ず指定して下さい。" + ccc
MM = MM + " DIM OutBuffer As String * 256" + ccc
MM = MM + " 解析文字列およびキー文字列は256バイト固定にしないこと" + ccc
MM = MM + " DIM InBuffer As String " + ccc
MM = MM + " DIM KeyStr As String " + ccc + ccc
MM = MM + " <返却値> 0:エラー n:返却した文字列の長さをバイト数で返します。"
End Select
MsgBox MM
End Sub
Sub QQQ_Click (Index As Integer)
Select Case Index
Case 0
Unload Me
Case 1
MsgBox "黄色のフィールドにデータを入力して下さい。" + Chr$(13) + "緑色のフィールドに情報が表示されます。" + Chr$(13) + Chr$(13) + " (C) EXCEED CORP. 1995 "
End Select
End Sub
Sub Text2_Change ()
Dim ibuf As String
Dim obuf As String * 256
Dim wbuf As String
Dim cnt As Integer
Dim kk As Integer
ibuf = text2.Text
cnt = Val(ibuf)
wbuf = text1.Text
ibuf = wbuf + Chr$(0)
If OPT(0).Value = True Then 'kanma
kk = EXtract%(1, cnt, ibuf, obuf)
Else
kk = EXtract%(2, cnt, ibuf, obuf)
End If
label1.Caption = obuf
label3.Caption = Str$(kk)
End Sub