找回密碼
 註冊
搜索
查看: 31320|回復: 2

有沒有function 可以跳離iF程式呢?

[複製鏈接]
發表於 17-8-15 20:54 | 顯示全部樓層 |閱讀模式
我們以下的程式,當它符合第一個條件時就跳離if 語句
if (lastvalue(close) > 500) {
printf("middle cooripate");
      if (lastvalue(close) > 80) {
          printf("small cooripate");
     }
}



發表於 17-8-16 06:23 | 顯示全部樓層
switch ( expression )
{

case constant-expression1 : statement;
....
break;

case constant-expression2 : statement;
...


}
回復

使用道具 舉報

發表於 17-8-16 22:35 | 顯示全部樓層
if (lastvalue(close) > 500) {
printf("middle cooripate");
else  if (lastvalue(close) > 80) {
          printf("small cooripate");
     }
}
回復

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則


Archiver|手機版|站長信箱|廣告洽詢|COCO研究院

GMT+8, 25-9-3 09:49

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回復 返回頂部 返回列表