Have you tried this script with Option Explicit?

-- Bill

>-----Original Message-----
>From: Steve Abaffy [mailto:sabaffy@;cditelecom.com] 
>Sent: Monday, November 11, 2002 1:13 PM
>To: ActiveServerPages
>Subject: Something Stupid I'm overlooking here.
>
>
>Hello
>I have the following function
>
>Function FormatPhone(PHONE)
>
>       IF PHONE <> "" THEN
>               Response.write "Phone = " & Phone & "<BR>"
>               Response.write "Right = " & Right(Phone,4) & "<BR>"
>               FormatPhone = "(" & LEFT(PHONE,3) & ") " & 
>MID(Phone,4,3) & "-" &
>Right(Phone,4)
>               Response.write FormatPhone
>               Response.end
>       ELSE
>               FormatPhone = ""
>       END IF
>END FUNCTION
>
>which has the following outoput
>
>Phone = 4037815200
>Right = 0
>(403) 781-0
>
>As you can see it should be (403) 781-5200 so what obvious 
>thing am I over
>looking here???
>
>
>
>
>---
>You are currently subscribed to activeserverpages as: 
>[EMAIL PROTECTED]
>To unsubscribe send a blank email to 
>%%email.unsub%%
>


---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to