使用GOTO语句仅向下跳转会引起问题吗? [英] Problems that can arise from using a GOTO statement to jump down only?

查看:169
本文介绍了使用GOTO语句仅向下跳转会引起问题吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用GOTO语句仅向下跳转是否有任何危害?还是我们完全安全?

Is there any harm for using a GOTO statement to jump down only ? Or are we totally safe ?

我的意思是认为这是我的代码,

What I mean by that is think this as my code,

Some code ...
...

GOTO whereToJump

Some code ...
...

whereToJump: 

Some code ...

当whereToJump点始终位于GOTO语句下方时,是否存在任何安全问题?

When whereToJump point is always below the GOTO statement, is there any security issues?

推荐答案

这是最著名的计算机科学论文之一. 转到声明被认为有害由Dijkstra撰写.它从本质上说,没有人需要goto(我知道像往常一样有一些例外).

This is subject of one of the most famous computer science papers. Go To Statement Considered Harmful by Dijkstra. It essentially states that noone ever needs goto (I know there are a few exceptions as always).

那是1968年,但今天仍然很可读.

It is 1968 but still very readable today.

这篇关于使用GOTO语句仅向下跳转会引起问题吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆