Could anyone give the reason why this is happening:
------------------------------------------------------
Dim a1, a2, a3, a4, a5, a6, a7, a8 as Integer
a1=a2=a3=a4=a5=a6=a7=a8=0
msgbox ("a1:" & a1) 'Here the value of a1 is -1 and values
of a2 thru a8 are 0
------------------------------------------------------
Dim a1, a2, a3, a4, a5, a6, a7, a8 as Integer
a1=a2=a3=a4=a5=a6=a7=0
msgbox ("a1:" & a1) 'Here the value of a1 is 0 and values
of a2 thru a7 are 0
------------------------------------------------------
Cant I initialize values of more than 7 variables at a
time? 1 4729
Hi Pradeep,
If that were C# it would be fine. In VB you've got a single assignment (to
a1) or a very long Boolean expression.
'True, False, True, False, True, False, True!
a1 = ((((((a2=a3)=a4)=a5)=a6)=a7)=a8)=0 'True
'True, False, True, False, True, False!
a1 = (((((a2=a3)=a4)=a5)=a6)=a7)=0 'False
Regards,
Fergus
MVP [Windows Start button, Shutdown dialogue] This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: vj |
last post by:
Hi all,
I am using C++Builder-5. I want to run multiple cpp files at the same
time.
If I use the C++Builder for running a cpp file (i.e., I just double
click the cpp file, it then opens in the...
|
by: berns |
last post by:
Hi All,
A coworker and I have been debating the 'correct' expectation of
evaluation for the phrase a = b = c. Two different versions of GCC
ended up compiling this as b = c; a = b and the other...
|
by: Tim N. van der Leeuw |
last post by:
Hi,
The following might be documented somewhere, but it hit me unexpectedly
and I couldn't exactly find this in the manual either.
Problem is, that I cannot use augmented assignment operators...
|
by: raylopez99 |
last post by:
I need an example of a managed overloaded assignment operator for a
reference class, so I can equate two classes A1 and A2, say called
ARefClass, in this manner: A1=A2;. For some strange reason...
|
by: David Delony |
last post by:
I've hacked on shell and Perl and now I want to get seriously into
C. I got bogged down in K & R, but I realized that I need to know more
about the low-level computing stuff. I'd like some pointers...
|
by: john |
last post by:
Hey,
I know we use the pointer this to obtain a class object or class
member data. I don't follow the reason for example this code. I'am
quite confused
assingment operator
const B...
|
by: sturlamolden |
last post by:
Python allows the binding behaviour to be defined for descriptors,
using the __set__ and __get__ methods. I think it would be a major
advantage if this could be generalized to any object, by...
|
by: Bram Kuijper |
last post by:
Hi all,
I am trying to resize a vector of objects (MyObj below), which contain
references to other objects (OtherObj, see below). However, apparently
somewhere in the resize operation an...
|
by: hweekuan |
last post by:
hi,
it seems i can't assign the const variable u in class A, one way to
solve the problem may be to build a copy constructor. however, why
does C++ or vector class not like this code? my g++ is:...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
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: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |