条件演算子の簡易シンタックス
FLASHのActionScriptの条件演算子はふつう、
var numOne:Number = 8;
var numTwo:Number = 5;
if (numTwo > 0) {
trace(numOne / numTwo); // 1.6
} else {
trace("carrot");
}
…と、if....else を使って書くことが多い。
これをもっと短く、、条件 (?:) 演算子を使った簡易スタイルで記述すると、
var numOne:Number = 8;
var numTwo:Number = 0;
trace((numTwo > 0) ? numOne/numTwo : "carrot");
…という記述になる。たしかに短い記述で簡潔だ。
しかしマニュアルではこの書き方を強く避けるように口を酸っぱくして何度も言っている。
「ActionScript が読みにくくなります。」
「簡易シンタックスは読みにくくなるので、お勧めできません。」
「どうしても使う場合はをカッコで囲むなどして読みやすくしてください」
「自分や、この ActionScript を使用する他の人が間違えることも考えられます」
などなど。
構文を知らなければ、確かになんのことやらな話になるだろう。
しかしある程度構文を知っていることが前提になる ActionScript は短くて簡潔ならそれでいい、という考え方はダメなんだろうか。
どちらの書き方も確かに一長一短があるし、書き方を統一していればそれほど極端に毛嫌いするように「使うな」と言わなくてもいい気がする。
すくなとも、コードのキレイさでは、簡易スタイルのほうがキレイだと思う。
「三項演算」なんていう名前もよくない。これはしかたないけど。
コメント
I would like to convey my appreciation for your kindness in support of those individuals that really want assistance with that area. Your very own commitment to passing the solution up and down had become surprisingly valuable and has in every case made individuals much like me to attain their pursuits. Your amazing useful guidelines signifies so much to me and extremely more to my mates. Thanks a lot; from all of us.
投稿者: college grants | 2011年07月23日 05:00
I am glad to be a visitant of this double dyed weblog ! , thankyou for this rare info ! .
投稿者: sony DVP-FX950 | 2011年07月23日 08:02
WONDERFUL Post.thanks for share..extra wait .. …
投稿者: Autoxten | 2011年07月23日 08:20
I got good info from your blog
投稿者: madhan | 2011年07月23日 16:45
Hi, This is one of the most helpful blogs i've seen on this subject. And i've been looking for a while! I am also a blogger in this field therefore I can understand your effort and is there anyway of submitting my email to updates on posts or new information? Cheers :)
投稿者: Tyson F. Gautreaux | 2011年07月23日 19:42
There are actually a whole lot of particulars like that to take into consideration. That could be a great point to bring up. I supply the thoughts above as basic inspiration but clearly there are questions just like the one you deliver up where an important factor shall be working in trustworthy good faith. I don?t know if best practices have emerged around things like that, but I am sure that your job is clearly identified as a fair game. Each boys and girls really feel the impression of just a moment’s pleasure, for the rest of their lives.
投稿者: Camel Duty Free Cigarettes | 2011年07月23日 21:41
Great stuff from you, man. Ive read your stuff before and youre just too awesome. I love what youve got here, love what youre saying and the way you say it. You make it entertaining and you still manage to keep it smart. I cant wait to read more from you. This is really a great blog.
投稿者: canon sd780is | 2011年07月23日 22:36
Your house is valueble for me. Thanks!…
投稿者: best mascara in the world | 2011年07月24日 00:07
Excellent share about olive skin it is surely. We’ve been waiting for this information
投稿者: olive skinned people | 2011年07月24日 15:11
Academic gurus are the Academic Writers who write your paper, Dissertation, Thesis, Finance Assignment, Accounting Assignment, and many more.
投稿者: Academic writer | 2011年07月24日 20:18
Very nice post. I just stumbled upon your blog and wished to say that I've truly enjoyed surfing around your blog posts. After all I’ll be subscribing to your feed and I hope you write again very soon!
投稿者: Deal or No Deal | 2011年07月24日 23:31
I like the helpful info you provide in your articles. I will bookmark your weblog and check again here frequently. I'm quite sure I will learn a lot of new stuff right here! Best of luck for the next!
投稿者: Deal or No Deal | 2011年07月25日 00:39
This is very interesting, You are a very skilled blogger. I've joined your feed and look forward to more of your great post. Also, I have shared your web site in my social networks!
投稿者: Deal or No Deal | 2011年07月25日 01:22
Hello There. I found your blog using msn. This is a very well written article. I’ll be sure to bookmark it and come back to read more of your useful info. Thanks for the post. I’ll definitely comeback.
投稿者: Deal or No Deal Blog | 2011年07月25日 01:46
Hi there, just became aware of your blog through Google, and found that it is truly informative. I’ll appreciate if you continue this in future. A lot of people will benefit from your writing. Cheers!
投稿者: Deal or No Deal | 2011年07月25日 19:12
Hi there, just became alert to your blog through Google, and found that it is really informative. I’ll be grateful if you continue this in future. Numerous people will benefit from your writing. Cheers!
投稿者: Deal or No Deal | 2011年07月25日 20:39
Hi there, just became alert to your blog through Google, and found that it is truly informative. I will be grateful if you continue this in future. Many people will benefit from your writing. Cheers!
投稿者: Deal or No Deal | 2011年07月25日 21:57
I and also my pals were reading the best pointers located on your web site then quickly I got a horrible feeling I never expressed respect to the blog owner for those techniques. Those ladies appeared to be so very interested to read through them and already have really been having fun with those things. Thanks for being really considerate as well as for going for some very good subject areas most people are really needing to understand about. Our honest apologies for not expressing appreciation to you sooner.
投稿者: leonor knaack | 2011年07月26日 20:11
Hello There. I found your blog using msn. This is a really well written article. I will make sure to bookmark it and come back to read more of your useful information. Thanks for the post. I will definitely return.
投稿者: Nintendo ds | 2011年07月26日 21:28
Hey There. I found your blog using msn. This is a very well written article. I will make sure to bookmark it and return to read more of your useful information. Thanks for the post. I’ll definitely return.
投稿者: Nintendo ds | 2011年07月26日 22:39
Very nice post. I just stumbled upon your blog and wanted to say that I've really enjoyed surfing around your blog posts. In any case I will be subscribing to your feed and I hope you write again very soon!
投稿者: Nintendo ds | 2011年07月26日 23:08
Very nice post. I just stumbled upon your blog and wished to say that I've really enjoyed browsing your blog posts. After all I’ll be subscribing to your rss feed and I hope you write again soon!
投稿者: Tava tea | 2011年07月27日 04:31
Very nice post. I just stumbled upon your blog and wanted to say that I've truly enjoyed browsing your blog posts. In any case I will be subscribing to your rss feed and I hope you write again very soon!
投稿者: Weight loss Tea | 2011年07月27日 05:28
Hello There. I found your blog using msn. This is a very well written article. I’ll make sure to bookmark it and return to read more of your useful info. Thanks for the post. I will definitely comeback.
投稿者: Weight loss Tea | 2011年07月27日 06:15
Hi there, I recently saw your website lacking search engine ranking. It appeared to be at the bottom and losing out vital traffic. I have a working solution to put you at the top of search engine to gain full exposure and rank high to get mass amount of audience who would love to read your great content. The content you provide is great but requires ranking and I can help you with that. Visit my site to find out more!
投稿者: sennheiser headphones | 2011年07月27日 07:20
There are numerous posts around near this, I do believe taking there reference could experience made this spot or article really informative. Practical goal expression this post is negative. Simply I must pronounce that this info provided here was unique, merely to make it more close to complete, supporting with former information get been actually good. The points you will get touched here i will discuss vital, thus I most certainly will spot a few of the information here to build this actually good for entirely the newbie’s here. Many thanks this review. Actually helpful!
投稿者: unlock iphone | 2011年07月27日 13:20
Hello There. I found your blog using msn. This is a really well written article. I’ll make sure to bookmark it and return to read more of your useful information. Thanks for the post. I’ll definitely comeback.
投稿者: family actifry | 2011年07月27日 19:43
I found your blog site on google and check a couple of of your early posts. Proceed to maintain up the very good operate. I just extra up your RSS feed to my MSN Information Reader. Seeking forward to reading extra from you later on!…
投稿者: varicella titer | 2011年07月29日 02:25
I like Your Article about corns blog: æ¡ä»¶æ¼”ç®—åã®ç°¡æ˜“シンタックス Perfect just what I was searching for! .
投稿者: mutual funds | 2011年07月29日 14:56
WONDERFUL Post.thanks for share..extra wait .. …
投稿者: education | 2011年07月31日 06:21
Good news brotherThank buyers being distribute ideal good informations. A New internet is greatI am inspired by the advice that buyers have on on things like this homepage. this shows Tricks to excellent end users know your title. saved this homepage, went go back for way more. end users, my acquaintance, ROCK! I discovered only the information I now searched all over the place and also just couldn’t discover. What a get it over site. liking this website Ones New web site is a as for my new favs.I like stuff like this info shown and this without doubt has given me A few kind on desire how to succeed being Some motive, ever so keep up the good the job
投稿者: Tablet Android Honeycomb Terbaik Murah | 2011年07月31日 09:32
Your article is simply what I was looking for at this point. I've never been interested in this topic and I've got to say your page is the first one to cover it suitable.
I've bookmarked your blog for future reference.
投稿者: pisici amuzante | 2011年08月01日 20:08
Oh my goodness! an incredible article dude. Thanks Nonetheless I am experiencing difficulty with ur rss . Don’t know why Unable to subscribe to it. Is there anyone getting similar rss drawback? Anyone who is aware of kindly respond. Thnkx
投稿者: Wilbur Warf | 2011年08月03日 13:46
I was very pleased to find this site.I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post.
投稿者: Tyson F. Gautreaux | 2011年08月03日 22:04
I have been reading a lot on here the topic corns blog: æ¡ä»¶æ¼”ç®—åã®ç°¡æ˜“シンタックス inspired me, i have picked up some really great ideas. Thanks and i hope to see more soon.
投稿者: Hier Haarentfernung | 2011年08月04日 12:34
Wow, this was a really quality post. In theory I’d like to write like this too – taking time and actual effort to make a good post… but what can I say… I procrastinate alot and never appear to get something done.
投稿者: teva discount code | 2011年08月07日 17:03
First-class article about olive skin it is surely. I’ve been waiting for this information
投稿者: Schlüsseldienst München | 2011年08月07日 19:51
Good Morning I'm Tina. Excellent post, I passed this onto a colleague who was doing a little homework on that. And he in fact bought me cocktail because I found it for him! please watch my video http://www.youtube.com/watch?v=vwYyF0-H6LQ
投稿者: Jada Gorrell | 2011年08月08日 02:54
I agree with your corns blog: æ¡ä»¶æ¼”ç®—åã®ç°¡æ˜“シンタックス, excellent post.
投稿者: fieldrunners hd | 2011年08月08日 04:20
Hi there, I discovered your internet website via Google even though looking for a related topic, your web website came up, it looks great. I’ve bookmarked it in my google bookmarks.
投稿者: Jane the Gamer | 2011年08月08日 06:27
Ciao ottimo articolo, grazie mille
投稿者: angelina sexy web cam | 2011年08月08日 08:50
Cat Toys Used for Less offers you an continually-growing choice of fun cat toys with the purpose of self-control keep your separate friend busy (as well as active) intended for hours Keeping your indoor cat active helps prevent health risks such while obesity
投稿者: ninja cat | 2011年08月13日 07:41
Will not be alive startled proviso you possess lots of feline money since making the toys, your cat willpower require at what time play plus it otherwise you even use up it
投稿者: funny cats | 2011年08月13日 15:06
Living with cats intended for numerous years has taught me splendid matter the needs while kitties possess I enjoy talking with people subject their cats along with sharing what I have learned concerning cat furniture with how it benefits our feline associates Given that as of our home based store
投稿者: dog and cats | 2011年08月13日 21:08
You take wonderful apprehension of your kitty He or she is a member of your family You wouldn't serve your family a meal with a damaging ingredient in the mix plus you certainly wouldn't provide your furry friend in addition to anything as soon as would own a damaging impact subject matter their health with well self So permit's take several minutes at what time come across elsewhere what's used after do Pussicat Cat Furniture
投稿者: kitten surprise | 2011年08月14日 03:31
Thank you a lot for giving everyone an exceptionally memorable chance to check tips from this blog. It is always very pleasing and packed with amusement for me and my office mates to visit your blog no less than thrice per week to see the latest tips you will have. Not to mention, I am at all times satisfied with your awesome concepts you give. Selected two ideas on this page are without a doubt the most effective I have ever had.
投稿者: Aluminium radiators | 2011年08月14日 04:18
Living along with cats for various years has taught me terrific with reference to the needs with the purpose of kitties be the owner of I enjoy talking with people as regards their cats as well as sharing what I possess learned subject matter cat furniture along with how it benefits our feline contacts In view of the fact that as of our internet service store
投稿者: surprised kitty | 2011年08月14日 06:37
after that taking a nap as soon as relatively remarkable lasts the rest of the day Every of to napping tends while put pounds concerning our kitties that brings me while why they want cat furniture
投稿者: munchkin kitten | 2011年08月14日 06:45
Why perform cats necessitate so when scratch? Force your cat really scratch their furniture instead of yours? What attracts cats while scratch with reference to their furniture instead of yours? What's the grand wonderful feature of a scratching post otherwise pole? All wonderful questions, allow's understand rider we be capable of shed various light on the issue for you
投稿者: funny kitten | 2011年08月14日 08:52
Via catnip what time cheer up your cat is a groovy drv at what time entertain manually because well Barely watching your cats' silly rejoinder so when fresh catnip will keep you laughing and kitty force be devoted to you intended for it
投稿者: cat images | 2011年08月14日 12:35
injury whilst your cat Selected of the custom manufacturers agree to you with the intention of designate the floor type to the cat tree determination rest on as well as build the bottom of the base differently intended for tile before wood floors in view of the fact that opposed once to carpeted floors
投稿者: pics of cats | 2011年08月14日 16:56
While having lunch along with a friend, I mentioned while I was wondering area buying a item of cat furniture pro my fur baby She looked at me resembling I had two heads along with next enquired "Oh, approximating little tables along with chairs?" Sort of resembling doll house furniture qualification used for cats she asked
投稿者: cat pregnancy | 2011年08月14日 17:27
I’m impressed, I must say. Actually not often do I encounter a weblog that’s each educative and entertaining, and let me inform you, you have hit the nail on the head. Your idea is outstanding; the difficulty is something that not enough people are talking intelligently about. I'm very pleased that I stumbled throughout this in my seek for one thing referring to this.Please visit our full movie site http://fullmovies.cc to Download as many Movies as you want and Watch them on any Device with No restrictions! cheers.
投稿者: watch comedy movies | 2011年08月15日 04:25
I'm continue learning from you, and I'm bettering myself. I actually enjoy reading everything that's written on your blog. Keep the articles coming. I enjoy it!
投稿者: http://howtoraisecashfastnow.com/blog/ | 2011年08月15日 06:00
These numbers are land line numbers which include the owner's name with address. Proviso they won't include every cell otherwise cellular phone numbers as well seeing as unlisted or non-published ones. In additional words, test doing a search
投稿者: free reverse cell phone lookup | 2011年08月15日 06:58
Possibly the stately terrific as well as earth-shattering spend of Moment subject matter the On line - aside commencing terrible animated blog intros - is the revolution Second video caused issue YouTube
投稿者: cell phone lookup | 2011年08月15日 18:18
Take the phone for example. And a mobile phone, you know how to talk or text with people even halfway around the world, qualification by the side of the identical instant it makes it easier to study your acquaintances. near incredibly true now with the aim of we have possession of rearrange cell phone number search
投稿者: phone number lookup free | 2011年08月15日 18:25
I have enjoyed viewing your site and poring over various articles. corns blog: æ¡ä»¶æ¼”ç®—åã®ç°¡æ˜“シンタックス is a well written piece about a very intriguing topic. I anticipate your upcoming updates.
投稿者: chistmas lights | 2011年08月16日 07:09
Stipulation you call for while carry out transpose mobile phone lookup so when be in possession of the owninformation a propos almost all mobile phone numbers of the subscribers in the United States. These databases include the names, verified addresses in addition to supplementary particulars of cell phones, fixed phones because well seeing as hidden and private phone numbers
投稿者: anywho reverse lookup | 2011年08月16日 09:54
I was looking through StumbleUpon for blogs on this very subject so I really enjoyed your well written post. I enjoyed your writing type and have subscribed to your feed so I can catch, not miss future articles on this and other topics.
投稿者: broadband speed test | 2011年08月16日 10:43
It is undemanding as discover a phone number lookup blog regarding the home based. supplementary key in the search phrases in addition to you'll definitely be the owner of of majestic of results. Unfortunately, not all of them are reliable
投稿者: reverse cell phone lookup | 2011年08月16日 15:06
I agree with your corns blog: æ¡ä»¶æ¼”ç®—åã®ç°¡æ˜“シンタックス, good post.
投稿者: Spirit HD Apk | 2011年08月16日 21:11
The cellular phone search services created an advanced system that be capable of inquiry multiple directories next to while with the aim of discover the essentials fast. By means of inputting the details into the lookup box plus clicking
投稿者: cell phone number lookup | 2011年08月16日 23:18
Your written piece, corns blog: æ¡ä»¶æ¼”ç®—åã®ç°¡æ˜“シンタックス, really made me stop and ponder this matter. Not only was it well written but very informative as well. I have added your website to my link roll and will be back to read future posts.
投稿者: holy land tours | 2011年08月16日 23:57
Execute you require as soon as search a cellular phone number proviso are tired of false promises? Visit us and squander our rearrange cell phone number lookup directory. We offer reliable with entirely affordable phone number lookups used for no more as regards some number you be capable of believe given that well as provide you plus a entire reorder lookup service resembling people search - with name, cellular phone number or else SSN,
投稿者: free reverse cell phone lookup with name | 2011年08月17日 00:10
Fortunately for these persons it can be probable once to hold videos it is usually merely not to be expected with the aim of squander the YouTube weblog
投稿者: free phone number lookup | 2011年08月17日 02:20
further reputed interweb turn around cellular phone lookup services in the U.S. hold legal agreements with fixed with phone companies so when share facts added while the their subscribers. Therefore, as soon as become a subscriber
投稿者: cell phone lookup | 2011年08月17日 06:43
I agree with your corns blog: æ¡ä»¶æ¼”ç®—åã®ç°¡æ˜“シンタックス, fantastic post.
投稿者: Spirit HD Apk | 2011年08月17日 07:32
I like Your Article about corns blog: æ¡ä»¶æ¼”ç®—åã®ç°¡æ˜“シンタックス Perfect just what I was looking for! .
投稿者: picsay pro apk | 2011年08月17日 13:45
I agree with your corns blog: æ¡ä»¶æ¼”ç®—åã®ç°¡æ˜“シンタックス, excellent post.
投稿者: fruit ninja apk | 2011年08月17日 13:45
On the contrary, supplementary turn around cellular phone lookup services free about the Google are enabling people so when in due course come across out the owners of individuals mysterious phone numbers. These paid services willpower let you to enter a mobile phone number
投稿者: how to naturally increase penis size | 2011年08月17日 16:01
Its why you necessitate after use such a lookup once to trace the owner of to facilitate telephone number
投稿者: male enhancement exercises | 2011年08月17日 16:31
released a phenomenal extension intended for Safari called YouTube5 Basically you know how to load it into the Safari 5 browser go to YouTube in addition to by familiar terms with every video without Jiffy
投稿者: how to naturally increase penis size | 2011年08月17日 18:40
Right these days, you know how to perform a rearrange telephone search in the USA plus have the exact essentials to facilitate was provided while they signed cheerful in support of their service
投稿者: penis advantage | 2011年08月18日 04:46
There are manifold reasons why annul mobile phone lookup services are in such high demand. The simplicity of finding out facts akin to a those name, address, marriage, divorce as well as criminal record data
投稿者: penis extenders | 2011年08月18日 05:49
Nowadays with the aim of you are done so when perform the swap number search, you call for as soon as prefer the blog after offers quash look up and doing of cell phone numbers. other than 'Google' along with you'll down load plenty of relevant results. Some offer open cell phone swap search
投稿者: how to enlarge penis | 2011年08月18日 07:30
Nowadays while you head back whilst YouTube you'll recognize a new player - subject regarding the bottom of the video window - comprehend how the player seems sundry? It nowadays is a brushed metal grey with a blue line indicating progress in the video relatively than red while or
投稿者: penis stretcher | 2011年08月18日 09:03
A invalidate telephone search is definitely not a scam. Each single search needn't provide an exact match; on the road to true even and 411 reverse lookups. In the event with the aim of a search
投稿者: how to grow penis | 2011年08月18日 09:07
It’s onerous to seek out knowledgeable individuals on this subject, however you sound like you recognize what you’re speaking about! Thanks .Please visit our Movie site http://fullmovies.cc to Download as many Movies as you want and Watch them on any Device with No restrictions! cheers.
投稿者: watch free english movie | 2011年08月18日 14:31