试看VB7如何抄袭Delphi(2)
听说vb7会增加很多新特性,现在举例:
1.new keyword Inherits:不用说,用delphi写过程序的人n年前就开始用了,甚至当年我用turbo pascal 5.5写程序的时候。
2.Overrides keyword :同上,不说了
3.Overloading:同上,熟悉delphi的,你可以比比看下面的程序声明:
Overloads Sub Display (theChar As Char)
Overloads Sub Display (theInteger As Integer)
Overloads Sub Display (theDouble As Double)
4.Structured Exception Handling: 您也看看这个例子!
Sub SEH()
Try
Open "TESTFILE" For Output As #1
Write #1, CustomerInformation
Catch
Kill "TESTFILE"
Finally
Close #1
End try
End Sub
5.Initializers
例如dim AA as integer=1
6.Constructor and destructor
微软的详细说明在这里:
http://msdn.microsoft.com/vstudio/nextgen/default.asp
虽然说这些VB的新特性我们已经等待很久了,但我担心VB7如果真的还是用伪编译或所谓的真正编译(compile to native code)的内核如果不是完全重写的话vb7的性能会降低更多!
(本题分数送给热情讨论的网友!)