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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB's Val equivalent in ASP 1

Status
Not open for further replies.

EchoAlertcom

IS-IT--Management
Oct 8, 2002
239
US
Hello,

Sorry the subject didn't match my question. Here is again.

Hello,

Could some one tell me what the equivalent of Val from VB is in ASP.

Here is my example:
Code:
dPageSize = Val(Trim(Mid(sResponse, Len("Content-Length:") + 1, lFoundAt - (Len("Content-Length:") + 1))))

Sincerely,
Steve Funk
 
I'm no expert but I believe that in VB the Val is used to convert the value to a varient. In ASP every variable is a varient, although you can force a variable type. i.e.,;

intHeadCount = Cint(variable)

or intHeadCount = Cint(intReservations) + Cint(intAtDoor)

This allows you to make sure that the variables are treated the way you want so that it doesn't bomb when you run it.

Additionally, can NOT declare variable types in ASP, i.e.;

DIM intHeadCount as Integer

Miek Diaz...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top