Re: Programming for Electronics Engineers
From: Keith Williams (krw_at_att.bizzzz)
Date: 01/18/05
- Next message: Dirk Bruere at Neopax: "Re: OT: Google Link Popularity"
- Previous message: Rene Tschaggelar: "Re: [OT] Career Outlook"
- In reply to: John Larkin: "Re: Programming for Electronics Engineers"
- Next in thread: John Larkin: "Re: Programming for Electronics Engineers"
- Reply: John Larkin: "Re: Programming for Electronics Engineers"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 18 Jan 2005 10:13:21 -0500
In article <a00pu0p4s55g1p616f1jgiqh6449a30k9n@4ax.com>,
jjSNIPlarkin@highTHISlandPLEASEtechnology.XXX says...
> On Tue, 18 Jan 2005 02:45:25 GMT, "Kryten"
> <kryten_droid_obfusticator@ntlworld.com> wrote:
>
> >>>John Larkin <jjlarkin@highSNIPlandTHIStechPLEASEnology.com> wrote:
> >>>[...]
> >>>>That's a lot of trouble to avoid a couple of GOTOs. I never understood
> >>>>the anti-GOTO religion.
> >>>
> >>>Someone said that GOTOs were a bad thing and everyone believed him.
> >
> >I feel that GOTO can be valid in a certain circumstances.
> >
> >Such as GOTO <special exit point>.
> >
> >However people will abuse anything they are offered, so
> >GOTO <valid local jump>
> >gets used a
> >GOTO <any place I damn well please anywhere in the entire program>
> >
> >Given the scope for appalling abuse, it might be wise to recommend very
> >sparing usage.
> >
> >I heard of a guy who's immediate boss (the company boss's son) thought all
> >code should use GOTO almost entirely, and tried to force everyone else to do
> >so.
> >
>
> I prefer very flat programs controlled by conditional GOTOs (or JMPs,
> in assembly) that operate as state machines. After all, not many
> computers have curly brackets in their native instruction sets. What
> language you use, and how you use it, just depends on how you think.
I prefer to use CASE like statements to implement state machines. The
PL/I Select/when fit me like a glove here. VHDL's CASE is not quite as
powerful, but makes very readable state machines. If it's done right
the implementation of the state machine can be determined at
compile/synthesis time, rather than during design.
-- Keith
- Next message: Dirk Bruere at Neopax: "Re: OT: Google Link Popularity"
- Previous message: Rene Tschaggelar: "Re: [OT] Career Outlook"
- In reply to: John Larkin: "Re: Programming for Electronics Engineers"
- Next in thread: John Larkin: "Re: Programming for Electronics Engineers"
- Reply: John Larkin: "Re: Programming for Electronics Engineers"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|