Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component


Downloads
.NET 2.0
.NET 1.*
.NET x64
VC++ 6.0
VC++ 7.0
VC++ 8.0
Java
Ruby
Perl 5.8.*
Perl 5.10.*
Python
Bounce ActiveX
Charset ActiveX
Email ActiveX
FTP2 ActiveX
Crypt ActiveX
HTML-to-XML ActiveX
HTTP ActiveX
IMAP ActiveX
MHT ActiveX
MIME ActiveX
RSA ActiveX
Socket ActiveX
Spider ActiveX (free)
String ActiveX (free)
Tar ActiveX
Upload ActiveX (free)
XML ActiveX (free)
XMP ActiveX
Zip ActiveX

Index of Chilkat Blog Posts

March 16, 2006

VB6 function calls vs. subroutine calls

In VB6, there is a difference between the syntax for a subroutine call and
a function call. The function call is a method with arguments in parentheses,
such as:

success = zip.UnzipMatching("unzipDir","*.jpg",1)

You could also call it as a subroutine, but you *must* leave off the parens:

zip.UnzipMatching "unzipDir", "*.jpg", 1

A function with one argument might seem confusing, because both seem to work:

zip.OpenZip ("test.zip")

and

zip.OpenZip "test.zip"

However, VB6 recognizes the function parameter list by the commas, so the ("test.zip") is just
an expression. You’ll notice that VB6 will insert a space between the method name and
the left paren. However, if you call it as a function, no space is inserted:

success = zip.OpenZip("test.zip")


Privacy Statement. Copyright 2000-2008 Chilkat Software, Inc. All rights reserved.
Send feedback to support@chilkatsoft.com

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, and Windows 95/98/NT4.