[AccessD] Learning .Net -- PHP Instead?

Max Wanadoo max.wanadoo at gmail.com
Wed Jun 24 16:52:41 CDT 2009


Drew, could it have been done in a recursive fashion, better than the
"spaghetti Code"



Max
Ps. I love this song....be my soldier boy....1962 top hits.  Reminds me of
me...


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka
Sent: 24 June 2009 22:47
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Learning .Net -- PHP Instead?

Ummmm, no.  What I am describing is a jump point.  Not a loop.

A loop does something over and over.  A jump point is when something
needs to be 'looped' but conditionally on many factors.

The example I initially gave, could have been put into a function, that
was called in a loop, but to handle the 'skip everything if this or that
didn't happen', you would either need to put a lot more logical
conditions in, or put in an Exit function, which would mean you are
leaving a function at multiple points....OR, a Goto EndOfFunction where
you would go to the end of the function.  OR you can put a starting
point, and if all the conditions run through, it's fine, if any one of
them fail, it can return it to the start.

When you exit a loop (due to a condition), the code LEAVES the Do Loop.
Yes, you could nest one loop inside another, but it just simply does not
give you the abilities that a Goto statement has.  If you wanted to be
able to return to three unique steps in a process, nesting the loops
would be crazy.

The point is, Goto's can be a big factor in 'spaghetti' code, but they
can also make your code cleaner, and more logical.

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte
Foust
Sent: Wednesday, June 24, 2009 2:07 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Learning .Net -- PHP Instead?

True, but why would you construct it that way?  You're essentially
describing a callback.  And you CAN nest Do Loops, even in VBA.

Charlotte Foust 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka
Sent: Wednesday, June 24, 2009 11:54 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Learning .Net -- PHP Instead?

Why?

Code is used to make a functional project.  It's primary purpose is to
do just that.  After that, the code should be organized and readable,
and as optimized as possible.  With proper objects and function, this
can be accomplished.  With the exception of errorhandling a goto
statement is going to be a rare case, but NOT an excluded case, to make
the code readable and organized.  In my example, making a do loop would
require addition logic on each step, because when you exit a loop, it
starts all over.

A Do Loop cannot have extra 'loop' statements.  

Ie:

Do

'some condition is met: then Loop

Loop

Can't do that.  You can do that with a Goto statement.

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte
Foust
Sent: Wednesday, June 24, 2009 11:52 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Learning .Net -- PHP Instead?

A Do...Loop would be preferable to Goto.

Charlotte 
The information contained in this transmission is intended only for the
person or entity 
to which it is addressed and may contain II-VI Proprietary and/or II-VI
Business 
Sensitive material. If you are not the intended recipient, please contact
the sender 
immediately and destroy the material in its entirety, whether electronic or
hard copy. 
You are notified that any review, retransmission, copying, disclosure,
dissemination, 
or other use of, or taking of any action in reliance upon this information
by persons 
or entities other than the intended recipient is prohibited.


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list