473,395 Members | 1,495 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,395 software developers and data experts.

Execution Order

VB.NET seems to be processing things in a different "order" than I'm used
to. For example, I had a problem (I don't have the exact code handy anymore
so it's just a "guess") where if I put the complete code in a single
subroutine it wouldn't work but if I put the part that wasn't working in a
subroutine, and called it after the first subroutine finished, would work
even though if you laid out the actual commands linearly ("in order") they
would be exactly the same. Does anyone know why this happens and what is it
"called"?

--
Thanks,
Ricky W. Hunt
freendeed
Nov 21 '05 #1
5 1933
* "Ricky W. Hunt" <rh*****@hotmail.com> scripsit:
VB.NET seems to be processing things in a different "order" than I'm used
to. For example, I had a problem (I don't have the exact code handy anymore
so it's just a "guess") where if I put the complete code in a single
subroutine it wouldn't work but if I put the part that wasn't working in a
subroutine, and called it after the first subroutine finished, would work
even though if you laid out the actual commands linearly ("in order") they
would be exactly the same. Does anyone know why this happens and what is it
"called"?


Normally, this should not occur. I can imagine some situations where
placing code in a separate procedure and calling this procedure may
behave differently because of a possible small delay caused by the call
to the method, but in general, there must not be a difference.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #2
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2o************@uni-berlin.de...

Normally, this should not occur. I can imagine some situations where
placing code in a separate procedure and calling this procedure may
behave differently because of a possible small delay caused by the call
to the method, but in general, there must not be a difference.


That was my guess too. So I tried putting a Sleep command (up to 5 seconds -
5000ms) and it still didn't work. Only when I put it another block did it
work. I will try to come up with the exact code again and post it to see if
you have any clues. BTW, thanks for all the help you provide.
Nov 21 '05 #3
"Ricky W. Hunt" <rh*****@hotmail.com> wrote in message
news:JrkVc.194961$eM2.185468@attbi_s51...
VB.NET seems to be processing things in a different "order" than I'm used
to. For example, I had a problem (I don't have the exact code handy anymore so it's just a "guess") where if I put the complete code in a single
subroutine it wouldn't work but if I put the part that wasn't working in a
subroutine, and called it after the first subroutine finished, would work
even though if you laid out the actual commands linearly ("in order") they
would be exactly the same. Does anyone know why this happens and what is it "called"?

--
Thanks,
Ricky W. Hunt
freendeed


Are you reusing a variable name in the subroutine whic when the code is
linear alters its operation ? Just a guess.

--
Jonathan Bailey.
Nov 21 '05 #4
* "Ricky W. Hunt" <rh*****@hotmail.com> scripsit:
Normally, this should not occur. I can imagine some situations where
placing code in a separate procedure and calling this procedure may
behave differently because of a possible small delay caused by the call
to the method, but in general, there must not be a difference.


That was my guess too. So I tried putting a Sleep command (up to 5 seconds -
5000ms) and it still didn't work. Only when I put it another block did it
work. I will try to come up with the exact code again and post it to see if
you have any clues. BTW, thanks for all the help you provide.


OK, I think it doesn't make much sense to discuss this topic without the
source code that caused the problem.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #5
<jb> wrote in message news:41**********************@news.easynet.co.uk.. .

Are you reusing a variable name in the subroutine whic when the code is
linear alters its operation ? Just a guess.


No. It's just a call to the Window's Media Player. No variables involved at
all
Nov 21 '05 #6

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

Similar topics

13
by: z. f. | last post by:
Hi, i have a class that is derived from System.Web.UI.Page, and this is the class i use in my application as PageBase. all other page classes are deriverd from my PageBase instead of the...
8
by: Frank van Vugt | last post by:
Hi, If during a transaction a number of deferred triggers are fired, what will be their execution order upon the commit? Will they be executed in order of firing or alfabetically or...
23
by: roman | last post by:
Hi, I would like to have two actions for one event. But I want the second action to trigger when the first one action completes. Is it possible to do this in javascript? I'm using the onclick...
42
by: Sabiyur | last post by:
Hi all, one of the recent post gives the macro to do swap #define SWAP(m, n) (tmp = (m), (m) = (n), (n) = tmp) This macro will work, if the execution is from left to right. That is step 1)...
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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
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 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.