VBScript: What is default function parm type - ByVal or ByRef?

M

Mark Findlay

I know this should be a no-brainer, but I am seeing odd results in my ASP
VBScript function calls with the passed parameters.

In VBScript, is the default for a function parm ByRef or ByVal? I am running
Windows 2000 Server, IIS 5.

For example: What would be the result of the response.write statement below?

'---------------------
function GetStringText(s)
s = "goodbye"
GetStringText = s
end function

dim sString, sOtherString
sString = "hello"

sOtherString = GetStringText(sString)

response.write(sString & sOtherString)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top