[thelist] ASP Problems again..

Chris Blessing webguy at mail.rit.edu
Thu Oct 31 10:35:01 CST 2002

Yes but I believe it's only for user-defined subs, as they've built in the
ability to use parenthesis liberally with the intrinsic procedures/functions
(for the most part, I certainly haven't tried them all).

Plus let's not forget that you can define subs with or without parens, just
to add to the confusion:

sub something()
end sub

sub something2
end sub

You can even get away with declaring an argument-less function with no

function blah
end function

Additionally you can call function 'blah' without parens!

One thing you certainly will get an error on is using a sub as a function in
the short-notation block:

<% = something() %>


<% = something2 %>

BTW I agree with writing your own functions, although procedures do have
their place on occassion.

Chris Blessing
webguy at mail.rit.edu

> VB Script will give you an error if you use parantheses when
> calling a "sub"
> since subs don't return anything.  Conversely, if you omit () on function
> calls, you will also get an error.
> It is a good idea to always write your own routines as functions
> so you can
> return something, even if it is 1.  then you can utilize the () which are
> required in practically every other programming language (e.g. c, fortran,
> etc.)
> Jerry

More information about the thelist mailing list