?? ???? Microsoft ???????????? ????????? ??; ???? ??? ?? ????? ?? ????? ???? ?? ??????? ?????????
??????? ??? ??????????? ?? ???????? ???????? ?????? ???? ?? ??? ??? ??? ???? ??? ??????? ???????? ??? ??????????? ?? ?? ???? ?????? ?? ?????? ???? ??, ??????? ??? ??? ?? ???????? ????? ???:
- ???????? ?? ??? ??? ????? ?????? ?? ????????? ???? ?? ??? ?????? ??? ???? ?? ???-?????? ????? ?? ??? ?????? ?? ????
- ??? ???? ??????? ??? ??? ???????? ????? ??, ?? ???????? ?? ??? ?????
- ??? ???????? ???? ???? ??? ????? ??? ?? ?? ??? ?????
- ??? ?????? ?? ??? ???? ??? ????? ??? ?? ?? ??? ?????
- ???? ????? ?? ??? ????? ?? ??? ?????
- ??????? ?? ??? ?????? ?? ??????? ?? ??? ?????
- ??????? ???????? ???????? datatype ?? ????? ???? ????
????? ???: ?????? ???????? ?? ??????? ???????? ?? ??? ?? ?????????? ???? ?? ??????? ?? ???? ?? ???? ??? ?? ???? ?????? ??? ??? nonexistent ????? ?? ?????? ?? ??? ???? ?? ??? ?? ?????, ???? ??? ?????? ??????? ??????? ??? ?? ???? ??????? ??? ??? nonexistent ????? ?? ?????? ?? ??? ???? ?? ??? ?? ?????, ??????? ?? ??? ?? ????? ????? ??????? ???? ????? ???? ??????? ??? ????? ?? ???? ?? ???? ?? ????????? ???? ?? ??? exists ???? ?? ????? ?????
??????? ???????? ?? ?? ??? ?? Microsoft ???????????? ?????????, ?????? Visual Basic ?? ??????? 5.0 ?? ??? ?? ????????? ?? ??? ???? ???? ??? ?? ????? ????? ??????? ???? ?? ?? Microsoft ???????????? ????????? (SCRRUN.DLL) ??????? ?? ???? ???:
Windows Script Host
Windows NT Option Pack
IIS 3.0
Scripting 3.1 upgrade.
Step-by-Step ??????
- Visual Basic ??? ?? ?? ???? EXE ????????? ??????? ????? (????????? ???? ?? ??????? ????? ????????? ???? ???? ??.) Form1 ???????? ??? ?? ???? ??..
- Microsoft ???????????? ?????? ???? ?? ??? ??? ?????? ???????
- ????????? ?? ???? ???? ??????? ??????
- ????????? ????, ?? ??? ????, Project1.Properties ?? ???????? ???? ?? ????????? ???????? ?? ????? ???? ?? ????
- Module1 ??? ????? ??? ???????? ????:
Option Explicit
Dim dict As Dictionary
Sub Main()
Dim keyArray, itemArray, element
Set dict = New Dictionary
With dict
'set compare mode
.CompareMode = BinaryCompare
'add item using named arguments
.Add Key:="mike", Item:=22
'add item without named arguments
.Add "joe", 33
'case sensitivity and Exists method
'does MIKE exist?
Debug.Print "MIKE exists = " & .Exists("MIKE")
'change key value
.Key("mike") = "MIKE"
'does MIKE exist?
Debug.Print "MIKE exists = " & .Exists("MIKE")
'extract keys into variant array
Debug.Print "Array of Keys"
keyArray = .Keys
For Each element In keyArray
Debug.Print element
Next
'extract items into variant array
Debug.Print "Array of Items"
itemArray = .Items
For Each element In itemArray
Debug.Print element
Next
'empty the dictionary
.RemoveAll
Debug.Print dict.Count & " Items in Dictionary"
End With
Set dict = Nothing
End Sub
- ????????? ?? ?????? ?? ????? ???? ????? ?? ????????? ????? ???? ??, ?? ??? ??? ??? succeeds ???? ?? ??? ????? ??? ?? ?? ?????? ??? ?? ???? ??? ??? ????, ?? ??????? ???????? ?? ???? ??????? ?? ????? ?? ?????? ??? variant ??????? ?? ??????? ????? ??????
????? ???, ?? ??????? ?? ???? ???? ?? ?? ?????? ????? ????
???? ID: 187234 - ????? ???????: 03 ?????? 2010 - ??????: 4.0
???? ???? ???? ??:
- Microsoft Visual Basic 5.0 Learning Edition
- Microsoft Visual Basic 5.0 Professional Edition
- Microsoft Visual Basic 6.0 Professional Edition
- Microsoft Visual Basic 5.0 Enterprise Edition
| kbhowto kbscript kbmt KB187234 KbMthi |
???? ?????? ??????????????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:
187234
(http://support.microsoft.com/kb/187234/en-us/
)