Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Is ther an Uutoincrement operator

Posted on 2000-05-15
6
Medium Priority
?
155 Views
Last Modified: 2010-05-02
Coming from the C++ world I  find it strange that there is not an auto increment operator "++" which would be extremely benficial when handling variables with long names.

I was wondering if there is an undocument feature, to enable this.
0
Comment
Question by:SteveHurst
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 18

Accepted Solution

by:
deighton earned 30 total points
ID: 2809949
You could declare a sub

Public Sub inc(ByRef x)

    x = x + 1

End Sub

but then you need to

call inc(c)

inc(c) won't work!
0
 

Expert Comment

by:sergedornseiffer
ID: 2809982
sorry to correct you deighton but you you remove the call and then run the line like following

int c

he will do the same than

call inc(c) but it's less code

This is 'new' since VB4



0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2810692
Genau....
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 1

Expert Comment

by:j3877
ID: 2811321
I don't think that byref axually passes it by reference... I think it just makes a copy of the variable, and sends a referance to the copy to the function... perhaps I'm wrong here...
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2812243
Yep, you are. Byref actually passes it by reference. Honest.
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2836615
Steve, although I understand your disappointment with VB's failure to offer such functionality, giving deighton a "B" for his answer is not really fair: "don't shoot the messenger"...
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question