0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CeylonではC言語系のプログラム言語のほとんどで採用されている
三項演算子の下記の書き方が出来ません。


	value condition = true;
	
	value result = condition ? "True" : "False"; // コンパイルエラー

代わりにthen-elseで書くことが出来ます。


	value condition = true;
	
	value result = condition then "True" else "False" ;
	

うーん。
微妙にイマイチな。。。

まあ、三項演算子を使うこと事態が賛否あるので
どうなんでしょうね。

変数宣言のときに比較して代入の必要があればいいのかな?
うーん。

って感じでした。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?