首页 | 本学科首页   官方微博 | 高级检索  
     检索      

VB数据类型Variant的性能分析
引用本文:李村合.VB数据类型Variant的性能分析[J].物探化探计算技术,2001,23(2):171-175.
作者姓名:李村合
作者单位:石油大学华东计算机系,
摘    要:Variant是VB2.0及其以后版本的缺省数据类型,它是VCB中的一种特殊的数据类型可以包含数值,字符串或日期数据,还可以包括含特殊数值Empty,Error及Null等。Variant变量能够存储所有系统定义类型的数据,如果把它们赋予Variant变是,则不必在这些数据的类型间进行转换,VisualBasic会自动根据上下文字成任何必要的转换。这样我们可以使用Variant来替换任何数据类型,从而更有适应性。虽然使用方便灵活,但是Variant比其它数据类型所占内存大,并且运行速度慢,应该有限制地使用。

关 键 词:VisualBasic  数据类型  Variant缺省类型  数值  字符串
文章编号:1001—1749(2001)02—0171—05
修稿时间:2001年2月6日

PERFORMANCE ANALYSIS OF VARIANT DATA TYPE IN VISUAL BASIC
LI Cun-he.PERFORMANCE ANALYSIS OF VARIANT DATA TYPE IN VISUAL BASIC[J].Computing Techniques For Geophysical and Geochemical Exploration,2001,23(2):171-175.
Authors:LI Cun-he
Abstract:In VB2.0 and higher version, Variant is a default data type. The Variant is a special data type of Visual Basic that can contain numeric, string, or date data types. A Variant can also contain the special values Empty, Error, and Null. The Variant data type allows us to store most types of data. We don′t have to convert between these data types if they are assigned as Variant variables, for the Visual Basic automatically performs any necessary conversion depending on the context. We can use the Variant data type in the place of any data type to work with data in a more flexible way. Although it is flexible, it needs larger storage room and has slower computing efficiency than that other data types do. It should thus be used restrainedly.
Keywords:visual basic  data type  variant default type  performance analysis
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号