Home | Advertising Info51 USERS CURRENTLY ONLINE   
   Site Search Contact Us Friday, August 01, 2014  
 
 


 
ASPProtect
User Management Application with web based screens that allow you to manage users.
www.ASPProtect.com
 
ASPBanner
Banner Rotation system. Advertisers can monitor online statistical reports via their web browsers.
www.ASPBanner.com
 
ASP Photo Gallery
Upload an unlimited amount of albums. Set up categories.Image resizing thumbnail creation.
www.ASPPhotoGallery.com
 
ASPClassifieds
Classifieds system. Set up categories. Users can register themselves. Supports picture uploads.
www.ASPClassifieds.com



DISCUSSION ARCHIVES
 
Try a free httpZip trial now and compress for less!


We didn't realize
the site was so popular.

Other Stuff
 

 
 
Active Server Pages ASP programs help tutorial tutorials routine routines jobs listserve mailinglist bulletin board bulletin boards programming snippet snippets CJWSoft ASPProtect ASPBanner ASPClassifieds



(Advanced)  (Components)  (Database)  (General)  (Vbscript)




ASPProtect

 
Subject: Re: How to calculate the value of a string formula
From: Doug Walker
Date: 1/13/1999 11:45:49 AM
IP: 209.214.48.74



 

Caven wrote:
>I want to calculate a value of a formula you >inputed. such as:

>in a string : c= "(8 + 7 ) /3"

>how to calculate the value in vbscript?

>you know,there is a function named "EVAL()",
>but whats it in vbscript?

Try converting the string to a type "double" or "single" or "integer" like this:
<%c = cdbl((8 + 7) /3)%>

cdbl for conversion to type double
clng for long
cint for integer
Check this with <%=c%> and you should get 5.

<%Cdbl(c)%> doesnt work since c is already a string! You must make the conversion at the same time you are setting c.
Hope this helps.

Doug

Previous Message

Follow Up - Re: How to calculate the value of a string formula - Caven 1/13/1999 7:47:20 PM


 

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright 1998 - 2014 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

vbscript active server pages ASP vbscript SQL database informix oracle SQL Server Perl CGI Delphi PHP source code code sample samples program CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspclassifieds.com, www.powerasp.com,www.cjwsoft.com,www.aspphotogallery.com,www.codewanker.com,www.aspprotect.com,www.aspbanner.com