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

Cumulative assignment 1

Status
Not open for further replies.

disord3r

Programmer
Apr 12, 2002
189
US
There's something I used to do in PHP all the time, where I would, typically through a looping structure, continuously and cumulatively assign values to a single variable. I can't seem to accomplish this in ASP. With PHP I could just use the concatenator (a period) followed by the equal sign, like so:

$i = "a";
$i .= "b";
echo $b;

By echoing $b, the result would be "ab". I'm sure there is a way to do this in ASP, but I haven't found it yet.
 
Code:
Dim i
i = "a"
i = i & "b"
Response.Write i
-Tarwn ----------------------
| if(u=getc(this)) |
| putc('\a'); |
----------------------
 
Or in Javascript ASP it's roughly equivalent to how you used to do it in PHP, except it's
+=
not
.=
codestorm
Fire bad. Tree pretty. - Buffy
select * from population where talent > 'average'
You're not a complete programmer unless you know how to guess.
I hope I never consider myself an 'expert'.
<insert witticism here>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top