Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Re: on goto

Reply
Thread Tools

Re: on goto

 
 
wolfgang kern
Guest
Posts: n/a
 
      04-25-2010

"io_x" wrote:
> [Xpost to: alt.comp.programming, alt.lang.asm,
> comp.lang.c, comp.lang.c++, comp.programming]


> the people that speak not good about "goto"
> are uttled wrong; their code bug full etc


> more distant is your code from goto
> more your code is bug full and incompresible


> the "goto" is the key word for programming;
> all the remain, other than goto or jmp or jc or jz,
> and the easy cpu layout
> is the wrong way for programming


Except that GOTO is a HLL keyword and I'm Asmist and
more machine-code oriented than concerned about needs
within abstract structured HLL-compilers, I see nothing
wrong with GOTO as long it does what a programmer want.

I once checked PowerBasic's GOTO and found it always
compiled a long (16:16) jump, even rare required.
But its syntax checker cried aloud if you tried to
jump out of a [FOR/IF/...]-struct with GOTO.

I don't know C/C+-, but what I see by disassembling their
resulting output seem to end up in heavy bloated code,
perhaps from using BREAK and GOTO within nested blocks,
which the compiler may grant with copying all required
code-trails (stack recover/cleanup) to every added path.
So in this aspect GOTO may be really not the best choice.

see me happy for I don't need to care this in my world
__
wolfgang (ALA)










 
Reply With Quote
 
 
 
 
hanukas
Guest
Posts: n/a
 
      04-30-2010
On Apr 26, 9:46*am, "io_x" <a...@b.c.invalid> wrote:
> > Except that GOTO is a HLL keyword and I'm Asmist and
> > more machine-code oriented than concerned about needs
> > within abstract structured HLL-compilers, I see nothing
> > wrong with GOTO as long it does what a programmer want.

>
> you see all jmp, je, jc etc etc for me they are all gotos


A conditional jump is predicated instruction. I don't see anything
predicative in a goto statement, which isn't to say that the
similarity couldn't be deceiving without thinking about the
differences.

Hmmm.. so anything that changes the IP is a goto? By this defition
"NOP" would be a goto. Actually, this whole thread is glorious waste
of time, seriously guys.. this needs to be asked: WHAT THE ****!?!??

 
Reply With Quote
 
 
 
 
Lie Ryan
Guest
Posts: n/a
 
      04-30-2010
On 04/30/10 23:06, hanukas wrote:
> On Apr 26, 9:46 am, "io_x" <a...@b.c.invalid> wrote:
>>> Except that GOTO is a HLL keyword and I'm Asmist and
>>> more machine-code oriented than concerned about needs
>>> within abstract structured HLL-compilers, I see nothing
>>> wrong with GOTO as long it does what a programmer want.

>>
>> you see all jmp, je, jc etc etc for me they are all gotos

>
> A conditional jump is predicated instruction. I don't see anything
> predicative in a goto statement, which isn't to say that the
> similarity couldn't be deceiving without thinking about the
> differences.
>
> Hmmm.. so anything that changes the IP is a goto? By this defition
> "NOP" would be a goto. Actually, this whole thread is glorious waste
> of time, seriously guys.. this needs to be asked: WHAT THE ****!?!??
>


"mov eax, ebx" is a goto to the next machine instruction (ps: it has a
side effect of moving some arbitrary bits around in the memory, but
that's implementation detail, we don't care about that). So, ban mov!
 
Reply With Quote
 
Frank Kotler
Guest
Posts: n/a
 
      05-01-2010
io_x wrote:

....
> --------------------
> yes "je .1" would it mean "if zero flag == 1 goto .1";
> "je" is a 'conditional' goto;
> jmp is a goto.


Whereas "break", in my world, is an "OS thing" and has to do with
memory, not flow-control. I wanna use 'em both!

Best,
Frank
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VHDL Goto statement ? Skybuck Flying VHDL 9 08-26-2005 01:46 PM
Re: VHDL Goto statement ? Skybuck Flying VHDL 0 08-08-2005 03:21 AM
where does Console.WriteLine() goto in a web app? Flip ASP .Net 1 04-14-2005 08:01 PM
where does Console.WriteLine() goto? Flip ASP .Net 6 11-18-2004 06:05 PM
goto statement is recommened in systemc? youngsun park VHDL 2 11-18-2003 03:47 PM



Advertisments