Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling a function

Status
Not open for further replies.

rastkocvetkovic

Programmer
Aug 11, 2002
63
SI
I'll make it simple

library.asp:
-------
<%
Function TestFunction
TestFunction = 12
End TestFunction
%>
-------

test.asp
-------
<!--#include file=&quot;library.asp&quot;-->
The value is |<% Response.Write(TestFunction) %>|
-------

OUTPUT (no errors)
-------
The value is ||
-------

What could be wrong? Thanks in advance
 
assuming of course your server currently handles ASP :p codestorm
Fire bad. Tree pretty. - Buffy
select * from population where talent > 'average'
You're not a complete programmer unless you know how to guess.
I hope I never consider myself an 'expert'.
<insert witticism here>
 
not a good idea to having your naming the same refering to the variable and the function. can cause issues! Sometimes starting over can fix a problem at the end

admin@onpntwebdesigns.com
 
onpnt, ignore if I misread your last post: In this case, assigning a value to the function name is defining the value that will be returned from the function. It's not actually a seperate variable.
-Tarwn ------------ My Little Dictionary ---------
Reverse Engineering - The expensive solution to not paying for proper documentation
 
well, i was going to be polite any not say anything :) codestorm
Fire bad. Tree pretty. - Buffy
select * from population where talent > 'average'
You're not a complete programmer unless you know how to guess.
I hope I never consider myself an 'expert'.
<insert witticism here>
 
Sorry, wasn't correcting or criticizing, just trying to clear it up in this post so as not to confuse anyone later
-Tarwn :( ------------ My Little Dictionary ---------
Reverse Engineering - The expensive solution to not paying for proper documentation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top