Multiplying variables

1. Member
Join Date
Dec 1969
Posts
45

## Multiplying variables

How do I multiply (or do any other math function!) two values EG<BR><BR>session("variable")*Array(0)<BR><BR>I have tried many ways and every one gives me nothing EG.<BR>Response.Write "<BR>Here is the result of your query"<BR>Response.Write (cint(session("variable"))*array(3))<BR>Response.W rite "<BR>Here is the result of your query2"<BR>Response.Write (cint(session("variable"))*array(0))<BR>Response.W rite "<BR>Here is the result of your query3"<BR>Response.Write (cint(session("variable"))*array(3))+(cint(session ("variable2"))*array(0))<BR>Response.Write "<BR>Here is the result of your query4"<BR>Response.Write (session("variable")*array(0))<BR>Response.Write "<BR>Here is the result of your query5"<BR>Response.Write cint(session("variable")*array(0))<BR>Response.Wri te "<BR>Here is the result of your query6"<BR>Response.Write session("variable")*array(0)<BR><BR>and yet when I run this I can see that the values have come through:<BR><BR>Response.Write "<BR>Here is the result of your query7"<BR>Response.Write session("variable")<BR>Response.Write "<BR>Here is the result of your query8"<BR>Response.Write array(0)<BR><BR>Thanks for the help!

2. Senior Member
Join Date
Dec 1969
Posts
109

## oh emil emily emily

do u get an error message?? what is the output??

3. Member
Join Date
Dec 1969
Posts
45

## RE: oh emil emily emily

I don&#039;t get an error message! I just get my page with <BR><BR>Here is the result of your query<BR><BR>and nothing after it until I name the two variables which come out as 1 and 2. 1 comes from user input and 2 comes from a database. But when I try to multiply the two as I showed in my post I get nothing. A blank! Is what I am doing syntactually wrong? Or am I correct with my code?

4. Member
Join Date
Dec 1969
Posts
45

## Arse! I can't get this working!

I am now going to vomit!

5. Senior Member
Join Date
Dec 1969
Posts
202

## maybe...

Maybe you have to Cint the array value also?

6. Member
Join Date
Dec 1969
Posts
45

## RE: maybe...

I actually figured out that once I thrim the variables things are fine. I don&#039;t know why I wasn&#039;t getting a mismatch error. But my aditions(+) aren&#039;t wroking - it is just concatenating the strings. SO I think I&#039;ll try cint-int aswell, or cdec-ing.

#### Posting Permissions

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