`while(test)next`的`loop`如何在Mortran中工作?

时间:2018-02-21 14:19:57

标签: loops if-statement fortran logic next

我在这里有一个Mortran代码。

loop<(do something)   
<k=1,n; if(test) next; 
(do another thing 1); (do another thing 2);
(do another thing 3);
>
>

如果测试语句为真,会发生什么? 我想代码执行会做另一件事2跳过另一件事。

以上代码段是R中glmnet包的一部分。 包中有.Fortran("lognet",~~)

1 个答案:

答案 0 :(得分:0)

如果test求值为.true.,则程序进入该循环的下一次迭代。有关详细信息,请参阅此Mortran User's Guide