hidrau
asked on
How to create a library asp of functions and procedure
Hello guys, I don't know if what I want is possible, I would like to create a file.asp where is gonna be my library.
In delphi I can do that and what I only need is to call the unit and after all the functions or procedure from my library
I can call.
If it is possible, I need an example how to call the functions and how they should be declared in the library. Thanks
Alex
In delphi I can do that and what I only need is to call the unit and after all the functions or procedure from my library
I can call.
If it is possible, I need an example how to call the functions and how they should be declared in the library. Thanks
Alex
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
yea, but replace the function with the ones u would use, you can also use properties and subs.
Do this make any sense to you?
Thanks,
Loren
Do this make any sense to you?
Thanks,
Loren
ASKER
so, these are the steps:
1) I create a file.asp
2) write a function like this:
// What I only need is to add "Public" to it and classe name
Classe MyClass1
Function Even(num)
if (num MOD 2) = 1 Then
Even = False
else
Even = True
end If
End Function
End class
3) Use include as you explained to me. At the bottom of my asp file.
<!--#include file ="Library.asp"-->
Is It?
1) I create a file.asp
2) write a function like this:
// What I only need is to add "Public" to it and classe name
Classe MyClass1
Function Even(num)
if (num MOD 2) = 1 Then
Even = False
else
Even = True
end If
End Function
End class
3) Use include as you explained to me. At the bottom of my asp file.
<!--#include file ="Library.asp"-->
Is It?
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Well, what is the difference between class and a asp file with functions?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Class Example
Public Function ExampleFunction()
DoSomething
End Function
End Class
is it?