473,387 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Incrementing

Is there an equivalent of the += method (C/C#) or am I basicaly stuck doing:

counter = counter + x?
Jul 19 '05 #1
11 1344
I wonder that too, but I'm pretty sure that you are stuck.

Paul

"James Baker" <cp******@hotmail.com> wrote in message
news:ec**************@TK2MSFTNGP11.phx.gbl...
Is there an equivalent of the += method (C/C#) or am I basicaly stuck doing:
counter = counter + x?

Jul 19 '05 #2
x = x + 1

At least in VBScript that's the way

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"James Baker" <cp******@hotmail.com> wrote in message
news:ec**************@TK2MSFTNGP11.phx.gbl...
Is there an equivalent of the += method (C/C#) or am I basicaly stuck doing:
counter = counter + x?

Jul 19 '05 #3
Thanks...kind of a pain.

Oh, how I wish this company would move to .NET =).
Jul 19 '05 #4
If you used JScript for server-side scripting, yes there is.

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"James Baker" <cp******@hotmail.com> wrote in message
news:ec**************@TK2MSFTNGP11.phx.gbl...
Is there an equivalent of the += method (C/C#) or am I basicaly stuck doing:
counter = counter + x?

Jul 19 '05 #5
That's what I figured...I'm stuck with VBScript so I guess I'll do it the
old fashioned way. Although it isn't even really old fashioned, it's been
around for years! =)
Jul 19 '05 #6
In VBScript, no. But, you could make your own subroutine like so:
x = 1
up x
response.write x

Sub up(byRef i)
i = i + 1
End Sub

Ray at work

"James Baker" <cp******@hotmail.com> wrote in message
news:ec**************@TK2MSFTNGP11.phx.gbl...
Is there an equivalent of the += method (C/C#) or am I basicaly stuck doing:
counter = counter + x?

Jul 19 '05 #7
This might be asking a bit much, but there's no operator overloading in
VBScript, is there?
Jul 19 '05 #8
I do not believe so. VBScript is pretty basic. Even the _current_ version
of VB.net doesn't support it.

If you're familiar with C++, how about skipping ASP and going to ASP.net
using C#?

Ray at work
"James Baker" <cp******@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
This might be asking a bit much, but there's no operator overloading in
VBScript, is there?

Jul 19 '05 #9
He said "Oh, how I wish this company would move to .NET =).". So I don't
think that's happening.

Paul

"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:eW**************@TK2MSFTNGP10.phx.gbl...
I do not believe so. VBScript is pretty basic. Even the _current_ version of VB.net doesn't support it.

If you're familiar with C++, how about skipping ASP and going to ASP.net
using C#?

Ray at work
"James Baker" <cp******@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
This might be asking a bit much, but there's no operator overloading in
VBScript, is there?


Jul 19 '05 #10
=)...good deduction. Last company I worked for, everyone was fluent in C#
and VB.NET so we had our pick of the litter so to speak when it came to
languages. I used C# exclusively, but could troubleshoot/write VB.NET if
need be. Going back to classic ASP is pretty rough, but I don't have much
choice and with the current job market...I'll take what I can get.

James
Jul 19 '05 #11
Oh yeah, good point. :]

Ray at work

"Paul Baker [MVP, Windows - SDK]" <pa***@online.rochester.rr.com> wrote in
message news:e$**************@TK2MSFTNGP10.phx.gbl...
He said "Oh, how I wish this company would move to .NET =).". So I don't
think that's happening.

Jul 19 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tom | last post by:
Anyone help on this? PHP/MySQL I have a repeat region displaying records from orders in a CSV format: CalJoe33,18,08/23/2004,FED EX,PREPAID,WEBSITE,CA,Book,25.95,??? CalJoe33,18,08/23/2004,FED...
3
by: Mothra | last post by:
Here's what I'm trying to do (kill off old Unix logins): --------------------- $i=0; while (<$who>) { chomp($_); my @line = split(/\s+/, $_); # Split it into an array next unless ($line...
2
by: Mike Brearley | last post by:
I have a counter (alright one I found on asp101.com) that checks for a session variable to prevent the counter from incrmenting if a user refreshes the page or returns to the page during the same...
6
by: J. Campbell | last post by:
Hi everyone. I'm sure that this is common knowledge for many/most here. However, it was rather illuminating for me (someone learning c++) and I thought it might be helpful for someone else. I'm...
2
by: brian | last post by:
Hi, before coming to .NET, I utilized regular expressions mostly in JScript / JavaScript and also in my favorite text editor: TextPad (www.textpad.com) I don't know about JScript/JavaScript, but...
10
by: Antanas | last post by:
The problem is that when AddID is used multiple times in the same select statement, it returns the same value in all places. How could I force function AddID to increment OBJECTID sequence? Here...
2
by: Payson Books | last post by:
Where can I find some info on grabbing the recordID of the last record, incrementing it by one, and using the new number in a new record.
26
by: Bas Wassink | last post by:
Hi there, Does the ANSI standard say anything about incrementing variables past their limits ? When I compile code like this: unsigned char x = 255; x++; printf ( "%d\n", x );
53
by: subramanian100in | last post by:
I saw this question from www.brainbench.com void *ptr; myStruct myArray; ptr = myArray; Which of the following is the correct way to increment the variable "ptr"? Choice 1 ptr = ptr +...
9
by: subramanian100in | last post by:
The following portion is from c-faq.com - comp.lang.c FAQ list · Question 6.13 int a1 = {0, 1, 2}; int a2 = {{3, 4, 5}, {6, 7, 8}}; int *ip; /* pointer to int */ int (*ap); /* pointer to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.