什么是结束方式:?

时间:2018-04-01 06:48:33

标签: objective-c

在方法结束时,定义了以下操作:

end:
if (request.progress >= 1)
{
    request.decoderAttach   = nil;
}
[[LKImageMonitor instance] requestDidFinishDecode:request];

有谁知道结局是什么意思? 而且,这结束了:来自哪里? 我在哪里可以找到它的定义? 在C ++或Objective-C中是否有类似的定义?

1 个答案:

答案 0 :(得分:0)

end:是 goto 标签,它不代表任何东西,用于转到程序中的特定位置,例如。

#include<iostream>
using namespace std;
int main()
{
    int num;
    cout<<"Enter a number greater than 10: ";
    cin>>num;
    if(num < 10)
        goto end;
    cout<<"Number is greater than 10";
    end:
    return 0;
}
相关问题