Geoff,
 
Either remove the parenthesis from your sub call or add the keyword 'call' in 
front of it.  Like this:
 
formatnumber numlines, 0
 
-- or--

call formatnumber (numlines, 0)
 
Mark

Geoff <[EMAIL PROTECTED]> wrote:
Hey everyone. I'm just starting out in the world of ASP, and I have a
very basic question. Can anyone tell me why when I run the following
code in a script:

if linelength > 80 then
      numlines = linelength/80
      formatnumber(numlines,0) 'removes trailing decimals
      response.write(line)
      response.write "<br>"
      toAdd = (numlines+1)*80
      char=char+toAdd
end if

I am met with the error "Microsoft VBScript compilation (0x800A0414)
Cannot use parentheses when calling a Sub"

If I comment out the formatnumber(numlines,0) and add
response.write(numlines) to see what is being stored in the variable,
I get a normal value of 3.275, all ready to be formatted. I'd really
appreciate any help. Thanks a lot
-Geoff








SPONSORED LINKS 
Programming languages C programming language Computer programming languages 
Java programming language C programming language History of computer 
programming language 

---------------------------------
YAHOO! GROUPS LINKS 


    Visit your group "AspClassicAnyQuestionIsOk" on the web.
  
    To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
  
    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


---------------------------------




[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hlflbpk/M=362335.6886445.7839731.1510227/D=groups/S=1705006764:TM/Y=YAHOO/EXP=1123080347/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/";>In
 low income neighborhoods, 84% do not own computers. At Network for Good, help 
bridge the Digital Divide!</a>.</font>
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to