Creating Subroutines in ASP

Results 1 to 2 of 2

Thread: Creating Subroutines in ASP

  1. #1
    conn Guest

    Default Creating Subroutines in ASP

    Hi, how do I write subroutines in ASP.<BR><BR>Sub subname(variables)<BR>...<BR>end Sub<BR><BR>If so it&#039s not working!!<BR>I&#039m geting sintex errores! on SUB!<BR>

  2. #2
    Jason Miller Guest

    Default RE: Creating Subroutines in ASP

    That&#039s because VBScript isn&#039t a very good language. But it still works, if you know how to ask it in terms it comprehends (for no apparent reason)... try<BR><BR>function XYZ(var1, var2, var3)<BR> ...<BR> (to pass a value back, use XYZ = value before ending the function)<BR>end function<BR><BR>and note that if you&#039re not using a returned value of the function, you&#039ll have to "call XYZ(1, 6, 3)" when you&#039ve got more than one value to pass into it (ie "ABC(5.2)" is okay and "myVal = XYZ(1, 6, 3)" is okay, while "XYZ(1, 6, 3)" and "myVal = call XYZ(1, 6, 3)" are not... I miss my Perl...<BR><BR>and before anybody says "well go get it," my Sysadmin wants nothing to do with it and that&#039s why I don&#039t have it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •