如果那么结束 [英] if then endif

查看:72
本文介绍了如果那么结束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在endifs工作中遇到了争议,并且找不到任何关于

的论文。所以我希望我可以得到很多通知来确认我的b
信念。


这是:我相信以下内容:(1)如果是语言有一个endif,然后

每个if声明需要一个endif,以及(2)每个endif和

最后一次if。


例如,


如果......

如果

endif


不应该编译,因为必须有两个endif和最后一个endif

与最后一个if一起使用。实际的嵌套if语句要复杂得多,

它只是在未编译的演示文稿中使用

(伪代码)。


最后,我能找到这个吗?我不在乎这种语言,虽然一些

版本的Basic会是最好的,因为这是我朋友所理解的。


感谢您帮助

I am having a dispute at work over endifs, and cannot find any treatise on
this. So I am hoping that I can get a lot of correspondece confirming my
belief.

Here it is: I believe the following: (1)If a language has an "endif", then
every "if" statement requires an endif, and (2) every "endif" goes with the
last "if".

For example,

If .....
if
endif

should not compile because there must be two "endif"s and the last "endif"
goes with the last "if". The actual nested if statement is far more complex,
and it is just being used in a presentation that is not being compiled
(psuedo code).

Finally, were can I find this? I don''t care the language, although some
version of Basic would be best since that is what my friend understands.

Thanks for helping

推荐答案



lawjake写道:

lawjake wrote:

我在endifs的工作中遇到了争议,并且找不到任何关于

的论文。所以我希望我可以得到很多通知来确认我的b
信念。


这是:我相信以下内容:(1)如果是语言有一个endif,然后

每个if声明需要一个endif,以及(2)每个endif和

最后一次if。


例如,


如果......

如果

endif


不应该编译,因为必须有两个endif和最后一个endif

与最后一个if一起使用。实际的嵌套if语句要复杂得多,

它只是在未编译的演示文稿中使用

(伪代码)。


最后,我能找到这个吗?我不在乎这种语言,虽然一些

版本的Basic会是最好的,因为这是我朋友所理解的。


感谢您帮助
I am having a dispute at work over endifs, and cannot find any treatise on
this. So I am hoping that I can get a lot of correspondece confirming my
belief.

Here it is: I believe the following: (1)If a language has an "endif", then
every "if" statement requires an endif, and (2) every "endif" goes with the
last "if".

For example,

If .....
if
endif

should not compile because there must be two "endif"s and the last "endif"
goes with the last "if". The actual nested if statement is far more complex,
and it is just being used in a presentation that is not being compiled
(psuedo code).

Finally, were can I find this? I don''t care the language, although some
version of Basic would be best since that is what my friend understands.

Thanks for helping



如果并不总是需要End If。例如:


如果myCondition = True则x + = 1

If does not always require an End If. For example:

If myCondition = True Then x += 1


嗯,在VB中你可以拥有:


如果someCondition那么DoSomething()


这里没有endif。这是一个完全有效的声明


" lawjake" < la ***** @ discussion.microsoft.com写信息

news:09 *********************** *********** @ microsof t.com ...
Well, in VB you can have:

If someCondition Then DoSomething()

There is no endif here. This is a perfectly valid statement

"lawjake" <la*****@discussions.microsoft.comwrote in message
news:09**********************************@microsof t.com...

>我在endifs工作中发生争执,但找不到关于

的任何论文。所以我希望我可以得到很多通知来确认我的b
信念。


这是:我相信以下内容:(1)如果是语言有一个endif,

然后

每个if声明需要一个endif,以及(2)每个endif



last" if" ;.


例如,


如果.....

如果

endif


不应编译,因为必须有两个endif s和最后一个endif

与最后一个if一起使用。实际的嵌套if语句要多得多b / b复杂,

它只是在一个没有被编译的演示文稿中使用

(psuedo代码)。


最后,我能找到这个吗?我不在乎这种语言,虽然一些

版本的Basic会是最好的,因为这是我朋友所理解的。


感谢您帮助
>I am having a dispute at work over endifs, and cannot find any treatise on
this. So I am hoping that I can get a lot of correspondece confirming my
belief.

Here it is: I believe the following: (1)If a language has an "endif",
then
every "if" statement requires an endif, and (2) every "endif" goes with
the
last "if".

For example,

If .....
if
endif

should not compile because there must be two "endif"s and the last "endif"
goes with the last "if". The actual nested if statement is far more
complex,
and it is just being used in a presentation that is not being compiled
(psuedo code).

Finally, were can I find this? I don''t care the language, although some
version of Basic would be best since that is what my friend understands.

Thanks for helping



我知道语法可以是if ... then,或if..then ... else。什么

我需要的答案是,如果语法是if..then..else ... endif,你可以

创建我描述的代码以上使用和endif。或者,有没有

代码是if ... then ... else ... [endif]。


这是确切的逻辑我想知道它是否正确(

缩进是实际作者的'


如果HoursWorked< NormalMaxHours,

如果工作小时数为0.

然后显示PartTimeHoursMessage

结束如果

否则如果HoursWorked = 0,

然后显示NoHoursMessage

Else If HoursWorked NormalMaxHours,

然后显示OvertimeMessage

否则

显示RegularTimeMessage

结束如果

我相信最后的结尾是最后一个if?


谢谢

" Marina Levit [MVP]"写道:
I understand that the syntax can be "if ...then", or "if..then...else". What
I need the answer to is if the syntax is "if..then..else...endif", can you
create the code that I described above which uses and endif. Or, is there
code that is "if...then...else...[endif].

Here is the exact logic that I want to know if it is correct (the
indentations are the actual author''s:

If HoursWorked < NormalMaxHours,
If HoursWorked 0.
Then Display PartTimeHoursMessage
End If
Else If HoursWorked = 0,
Then display NoHoursMessage
Else If HoursWorked NormalMaxHours,
Then display OvertimeMessage
Else
Display RegularTimeMessage
End if
I believe that the final endif goes with the last if?

Thanks
"Marina Levit [MVP]" wrote:

嗯,在VB中你可以拥有:


如果someCondition然后DoSomething( )


这里没有endif。这是一个完全有效的声明


" lawjake"< la ***** @ discussions.micros oft.com写的留言

新闻:09 ********************************** @microsof t.com ...
Well, in VB you can have:

If someCondition Then DoSomething()

There is no endif here. This is a perfectly valid statement

"lawjake" <la*****@discussions.microsoft.comwrote in message
news:09**********************************@microsof t.com...

我在endifs工作中遇到了争议,并且找不到任何关于

的论文。所以我希望我可以得到很多通知来确认我的b
信念。


这是:我相信以下内容:(1)如果是语言有一个endif,

然后

每个if声明需要一个endif,以及(2)每个endif



last" if" ;.


例如,


如果.....

如果

endif


不应编译,因为必须有两个endif s和最后一个endif

与最后一个if一起使用。实际的嵌套if语句要多得多b / b复杂,

它只是在一个没有被编译的演示文稿中使用

(psuedo代码)。


最后,我能找到这个吗?我不在乎这种语言,虽然一些

版本的Basic会是最好的,因为这是我朋友所理解的。


感谢您帮助
I am having a dispute at work over endifs, and cannot find any treatise on
this. So I am hoping that I can get a lot of correspondece confirming my
belief.

Here it is: I believe the following: (1)If a language has an "endif",
then
every "if" statement requires an endif, and (2) every "endif" goes with
the
last "if".

For example,

If .....
if
endif

should not compile because there must be two "endif"s and the last "endif"
goes with the last "if". The actual nested if statement is far more
complex,
and it is just being used in a presentation that is not being compiled
(psuedo code).

Finally, were can I find this? I don''t care the language, although some
version of Basic would be best since that is what my friend understands.

Thanks for helping






这篇关于如果那么结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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