GOSUB [英] Gosub
问题描述
我知道我可以使用一个函数来获得相同的效果 - 但是php有任何类型的gosub命令都可以使用
。
I know I could use a function to get the same effect - but does php have
any type of gosub commands .
推荐答案
SOR写道:
SOR wrote:
我知道我可以使用一个函数来获得相同的效果 - 但是php有
任何gosub命令的类型。
I know I could use a function to get the same effect - but does php have
any type of gosub commands .
编号功能是子程序。如果你不想退货,
不要。
停止思考BASIC。
Ken
No. Function are subroutines. If you don''t want to return anything,
don''t.
Stop thinking in BASIC.
Ken
< comp.lang.php,Ken Robinson, ke ****** @ rbnsn.com >
< 11 ****************** ****@g49g2000cwa.googlegroups .com>
< 24 Jul 2005 10:13:43 -0700>
<comp.lang.php , Ken Robinson , ke******@rbnsn.com>
<11**********************@g49g2000cwa.googlegroups .com>
<24 Jul 2005 10:13:43 -0700>
我知道我可以使用一个函数来获得相同的效果 - 但是php有任何类型的gosub命令。
I know I could use a function to get the same effect - but does php have
any type of gosub commands .
否。函数是子程序。如果你不想退货,
不要。
停止思考BASIC。
No. Function are subroutines. If you don''t want to return anything,
don''t.
Stop thinking in BASIC.
我不记得问你我应该或不应该想的。
I dont recall asking you what I should or shouldnt think .
SOR写道:
SOR wrote:
停止在BASIC中思考。
Stop thinking in BASIC.
我不记得问你应该或不应该想的。
I dont recall asking you what I should or shouldnt think .
我认为对立感受到了对于BASIC来说,这就是gosub和goto
反对编写结构化程序的方式。
当然你可以使用FORTRAN 66的算术IF语句或那个
事实上你可以有多个入口和出口点允许函数
和FORTRAN中的子程序来消除BASIC的一些热量!
>
Pete
-
http://www.petezilla.co.uk
这篇关于GOSUB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!