From: "Sharan Basappa" <[email protected]>
> I am implementing an algorithm that I have worked out in theory. The
> algorithm is in the form of a flowchart.
> The area where I am having problem is where the flow passes from a
> lower decision block to higher one.
> I can implement this using a do while block for such flow. The issue
> is when multiple such decisions
> block go back to same point in the flowchart. When I look at the
> flowchart, it looks like it can be simply
> translated into code using jump blocks if a language supports it.
It's a bit hard to understand without the flowchart. Perl does
support goto, but most likely your lowed decision blocks should be
subroutines all called from either an if(){}elsif... structure or via
a hash of subroutine references.
> The other question I have is if my approach of using a flowchart was
> incorrect in the first place.
> But I did flowchart to get my idea straight and uncovered lot of
> potential issues during this exercise.
Use whatever works for you.
Jenda
===== [email protected] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/