Ana sayfa Genel Ruby Başlangıç Rehberi (Operatörler)

Ruby Başlangıç Rehberi (Operatörler)


Bu yazımızda özel olarak sadece Operatörlere değinmek istiyorum. Bir önceki yazımızda Karşılaştırma ve Mantıksal Operatörlere değinmiştik. Şimdi ise diğer Operatör türlerine değinme sırası !

Aritmetik Operatörler :

Bu Operatörler adından anlaşılacağı gibi basit aritmetik işlemleri yapmak için kullanılan Operatör türüdür.

Örnek vermek gerekirse :

Atama Operatörleri :

Bu Operatörleri örnek ile daha iyi açıklayabilirim.

Ruby’de bit düzeyinde işlem yapan operatörlerde mevcuttur.

Fakat ilk önce, bir sayının istenilen tabana nasıl dönüştürüldüğüne bakalım.

Bunu yapmak oldukça basit !


Genel formatı ile işlemi kolaylıkla gerçekleştirebiliriz.

.to_s(dönüştürülecek_taban) fonksiyonu belirtilen sayıyı temsil eden bir String’e dönüştürür.

.to_i(Geri_dönüştürülecek_sayının_tabanı) fonksiyonu ile sayıyı tekrardan 10’luk tabana dönüştürebiliriz.

Bit düzeyinde Operatörlere artık geçebiliriz.

Bunlar sırasıyla, 

& (ve) , | (veya) , ^ (XOR), ~ (Değili) Operatörleridir.

Şimdi sıra, bit düzeyinde sağa ve sola kaydırma operatörlerinde !

Gördüğünüz gibi bu operatörler 10’luk tabandaki bir sayının 2’lik tabandaki karşılığını istenilen düzeyde sağa ve sola kaydırılmasını sağlamaktadır.

Son olarak değineceğimiz Operatör ise, defined? Operatörü. Bu Operatör, ifadenin tanımlanıp tanımlanmadığını öğrenmemize yarar.

Daha değinmediğimiz birçok operatör mevcut. Onlara ise yeri geldiğinde değineceğiz. Şimdilik benden bu kadar, yeni bir yazıda görüşmek üzere. 🙂

Kaynaklar :

Önceki makaleİngilizce Öğrenme Yolları
Uludağ Üniversitesi - Fizik bölümü lisans son sınıf öğrencisiyim. Veri bilimi,Makine öğrenimi ve Kriptoloji ile uğraşıyorum.


  1. Helpful information. Lucky me I found your website accidentally, and I’m shocked why this coincidence didn’t took place in advance! I bookmarked it.

  2. Great post. I was checking constantly this blog and I am impressed! Very useful info specifically the last part 🙂 I care for such info a lot. I was seeking this particular information for a very long time. Thank you and good luck.

  3. I do love the manner in which you have framed this specific problem plus it does indeed provide us some fodder for thought. Nonetheless, through what I have witnessed, I just simply trust when other remarks pack on that folks stay on point and not embark upon a tirade involving some other news du jour. All the same, thank you for this fantastic piece and though I can not necessarily go along with it in totality, I value your point of view.

  4. Hello. Let me introduce the writer. Her identify is Janell but she doesn’t like when individuals use her complete title. Louisiana is the only location I’ve been residing in and my dad and mom live nearby. One of my preferred hobbies is dominoes but I haven’t manufactured a dime with it. Invoicing is how he supports his loved ones and he’s doing pretty excellent financially. See what’s new on her site right here: womens online shopping websites

  5. Hello this is kind of of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML. I’m starting a blog soon but have no coding experience so I wanted to get advice from someone with experience. Any help would be greatly appreciated!

  6. Hey very nice website!! Man .. Beautiful .. Amazing .. I’ll bookmark your web site and take the feeds additionally…I am happy to seek out a lot of useful info right here in the submit, we want develop more strategies in this regard, thanks for sharing. . . . . .

  7. I would like to thank you for the efforts you’ve put in writing this website. I’m hoping the same high-grade site post from you in the upcoming as well. Actually your creative writing skills has encouraged me to get my own website now. Really the blogging is spreading its wings fast. Your write up is a great example of it.

  8. Good V I should certainly pronounce, impressed with your site. I had no trouble navigating through all tabs and related information ended up being truly easy to do to access. I recently found what I hoped for before you know it at all. Quite unusual. Is likely to appreciate it for those who add forums or anything, website theme . a tones way for your customer to communicate. Excellent task..

  9. I am no longer positive the place you’re getting your info, however good topic. I needs to spend a while learning much more or working out more. Thank you for fantastic info I used to be in search of this information for my mission.

  10. Just wish to say your article is as astounding. The clearness to your post is simply spectacular and that i could suppose you are knowledgeable in this subject. Fine along with your permission allow me to snatch your RSS feed to keep up to date with drawing close post. Thanks one million and please continue the enjoyable work.

  11. Hey there! Someone in my Facebook group shared this site with us so I came to take a look. I’m definitely enjoying the information. I’m bookmarking and will be tweeting this to my followers! Superb blog and superb design.

  12. Hey there! I’m at work surfing around your blog from my new apple iphone! Just wanted to say I love reading your blog and look forward to all your posts! Keep up the outstanding work!

  13. I am just commenting to make you be aware of of the exceptional experience my wife’s girl experienced reading through your site. She figured out too many things, which include how it is like to have an excellent helping mood to make other individuals without problems master a variety of specialized things. You undoubtedly did more than visitors’ expected results. I appreciate you for producing those interesting, healthy, educational and also unique tips on the topic to Ethel.

  14. СТО Кузовщик предлагает Вам недорогой кузовной ремонт и покраску автомобилей в Санкт- Петербурге, Купчино.

    Производим ремонт после ДТП любой сложности. Вам не придётся ездить по разным сервисам – мы делаем комплексный ремонт, и Вы уезжаете от нас на полностью исправном автомобиле.

    Мы отремонтировали уже несколько тысяч машин, фотографии многих ремонтов можно посмотреть на нашем сайте. Для того, чтобы попасть на наш сайт – просто наберите в поиске СТО Кузовщик!

    Оценка повреждений по фото и выезд мастера для окончательной оценки – абсолютно бесплатно по СПб и ни к чему Вас не обязывает! Эвакуация в наш автосервис и дефектовка с разбором поврежденных узлов также бесплатна.
    Также, на сайте действует простой калькулятор ремонта – Вы можете сами предварительно понять объём предстоящих расходов.

    Все необходимые для ремонта запчасти закажем и найдём сами, по хорошим ценам. У нас есть своя авторазборка, поэтому большие скидки Вам обеспечены!

    Индивидуальный, профессиональный и честный подход к каждому случаю и к каждому клиенту, гарантия на все работы от 1 года и более. Мы всегда открыты для каждого, в любой момент ремонта Вы можете приехать, и мастер покажет и объяснит каждый этап ремонта.

    Приглашаем Вас в наш автосервис! У нас ремонт действительно качественно, честно и недорого!

  15. I will immediately grab your rss feed as I can not find your e-mail subscription link or newsletter service. Do you’ve any? Kindly let me know in order that I could subscribe. Thanks.

  16. I have been absent for some time, but now I remember why I used to love this website. Thank you, I will try and check back more often. How frequently you update your website?

  17. Hello, i think that i saw you visited my website so i came to “return the favor”.I am trying to find things to improve my site!I suppose its ok to use some of your ideas!!

  18. I do enjoy the way you have presented this specific matter and it does supply us a lot of fodder for thought. Nevertheless, through just what I have experienced, I just hope when the actual comments stack on that folks stay on issue and not embark upon a soap box regarding the news du jour. Anyway, thank you for this exceptional point and while I can not agree with the idea in totality, I respect your standpoint.

  19. Hi, i think that i saw you visited my web site thus i came to “return the favor”.I’m trying to find things to improve my website!I suppose its ok to use some of your ideas!!

  20. That is the suitable blog for anybody who needs to seek out out about this topic. You notice a lot its almost arduous to argue with you (not that I actually would want…HaHa). You undoubtedly put a brand new spin on a subject thats been written about for years. Great stuff, just great!

  21. Thanks for this great information. Well I wants to know little more about how we can convert any amazon link into affiliate link. Like we have tool for flipkart link but I am unable to find any tool for Amazon. Can you suggest me anyone?

  22. Only a smiling visitant here to share the love (:, btw outstanding style and design. “Make the most of your regrets… . To regret deeply is to live afresh.” by Henry David Thoreau.

  23. I am also writing to make you be aware of what a extraordinary experience our daughter experienced reading through your web site. She learned such a lot of pieces, most notably what it is like to have an awesome giving spirit to have the others really easily know just exactly a number of complicated topics. You actually surpassed readers’ expectations. Thank you for imparting such warm and helpful, trusted, informative and as well as fun tips on the topic to Ethel.

  24. What i don’t understood is actually how you’re not really much more well-liked than you may be right now. You’re so intelligent. You realize therefore considerably relating to this subject, made me personally consider it from a lot of varied angles. Its like men and women aren’t fascinated unless it’s one thing to do with Lady gaga! Your own stuffs nice. Always maintain it up!

  25. hello there and thank you for your info – I have certainly picked up anything new from proper here. I did then again expertise a few technical points the use of this website, as I experienced to reload the web site many times previous to I may just get it to load correctly. I were puzzling over if your hosting is OK? No longer that I’m complaining, however slow loading circumstances instances will sometimes affect your placement in google and could damage your quality score if advertising and ***********|advertising|advertising|advertising and *********** with Adwords. Well I am including this RSS to my e-mail and can look out for a lot more of your respective intriguing content. Ensure that you update this again soon..

  26. 100有機潤唇膏 雙頭磨沙滋潤豐唇膏 滋潤豐唇蜜 亮彩保濕口紅 亮彩保濕唇蜜 持久亮麗雙頭唇彩 唇線筆 唇膏筆 抗炎作用原理:內環境平衡,增強陰道內免疫力 CO2可本質的改變組織特性,使粘膜組織新生 陰道上皮細胞功能增強,大量糖原在陰道桿菌作用下分解成乳酸,逐步恢復陰道正常的PH值 免疫力增強,降低私密處感染

  27. Undoubtedly, It has multiple features which are useful for affiliate marketers. I am currently using Pretty Link to cloak the affiliate links. It also works fine for me. Thanks for showing an awesome alternative.

  28. The membership and join offers on puremature is extermly well organized like crowreviews for the sake of members of puremature and i am sure nop one of the memebrs is disappointed

  29. Hello there! I know this is kinda off topic but I’d figured I’d ask. Would you be interested in exchanging links or maybe guest authoring a blog article or vice-versa? My blog covers a lot of the same topics as yours and I feel we could greatly benefit from each other. If you are interested feel free to shoot me an email. I look forward to hearing from you! Awesome blog by the way!

  30. Hey there! I’ve been following your website for a while now and finally got the bravery to go ahead and give you a shout out from Huffman Tx! Just wanted to mention keep up the great job!

  31. Hello there, just became alert to your blog through Google, and found that it’s truly informative. I’m gonna watch out for brussels. I will appreciate if you continue this in future. Numerous people will be benefited from your writing. Cheers!

  32. [url=]buy levitra[/url] [url=]propecia[/url] [url=]generic avodart 0.5 mg[/url] [url=]clonidine 1 mg[/url] [url=]vermox 500[/url] [url=]baclofen[/url] [url=]kamagra[/url] [url=]prozac[/url] [url=]metformin[/url] [url=]paxil[/url]

  33. [url=]hydrochlorothiazide 12.5 mg[/url] [url=]azithromycin[/url] [url=]Cheap Avodart[/url] [url=]buy colchicine online[/url] [url=]albendazole[/url] [url=]vermox mebendazole[/url] [url=]paxil[/url] [url=]acyclovir 400mg tablets[/url] [url=]clonidine[/url] [url=]Antabuse[/url]

  34. Thanks , I have just been looking for information about this subject for a while and yours is the best I have came upon so far. But, what in regards to the bottom line? Are you sure concerning the source?

  35. [url=]finasteride for women[/url] [url=]avodart generic[/url] [url=]acyclovir 400mg[/url] [url=]vardenafil 40 mg[/url] [url=]propranolol prescription[/url] [url=]kamagra oral jelly 100mg[/url] [url=]arimidex weight loss[/url] [url=]tadacip[/url] [url=]hydrochlorothiazide[/url] [url=]erythromycin for sale[/url]

  36. I like the helpful information you provide in your articles. I will bookmark your blog and check again here regularly. I am quite certain I’ll learn a lot of new stuff right here! Good luck for the next!

  37. [url=][/url]

  38. Excellent post. I was checking constantly this blog and I’m impressed! Very useful information specially the last part 🙂 I care for such information much. I was seeking this particular information for a very long time. Thank you and best of luck.

  39. Looking for the best app to watch free movies on your iOS phone? Then your should check Showbox Application. This is the most famous app today that has a big library of shows and films. This app is also available for iMac users. But your need to download it first to enjoy free films

  40. Sweet blog! I found it while browsing on Yahoo News. Do you have any suggestions on how to get listed in Yahoo News? I’ve been trying for a while but I never seem to get there! Cheers

  41. РharmaEuroр sells real legit aanabolic steroids.
    All their stuff is authentic and of verү higһ qualuty –

    here you can buy testosterone, anadrol, trenbolone, human growth һormone, cytomeⅼ, T3, and more without prescription

  42. The subsequent time I read a blog, I hope that it doesnt disappoint me as much as this one. I mean, I do know it was my option to read, however I truly thought youd have something fascinating to say. All I hear is a bunch of whining about something that you could possibly fix if you happen to werent too busy in search of attention.

  43. Землевладелец одного из флагманов украинского аграрного сектора, компании ULF Олег Бахматюк рассказал о дотациях аграриям, а также объяснил уловка их распределения.

    — В последнее век появилось изобилие разговоров о несправедливости аграрных дотаций в стране. В часть числе, говорится, что вы являетесь одним из главных реципиентов этих дотаций.

    — В этом году компания «Укрлендфарминг» не получила ни одной копейки дотаций. И перед конца возраст не получит (смеется).

    — Теперь многократно говорят, что надо давать не больше 200 млн в одни руки и все. Так будет справедливо?

    — Справедливое план дотаций надо быть автоматическим и независимым от чиновника и бизнесмена. У нас работала не идеальная, однако рабочая пример автоматического возврата НДС. И она устраивала примерно всех. Ее сломали в угоду популизму, МВФ или снова почему-то. Зато немедленно предлагаются нерабочие модели, которые приводят к перекосам и массе инсинуаций.

    Следовательно, ровно сообразно мне, надо либо вернуться к автоматическому возврату, только это, насколько я понимаю, не позволит сделать МВФ, или нуждаться просто честный говорить: в следующем году никаких дотаций аграриям не потребно давать. Это будет честнее сообразно отношению к 80% рынка, чем измышлять очередные ситуативные квазимодели.

    — А ровно же обретаться с мелким фермером?

    — Мелкому фермеру необходимо дать возможность узаконить землю и урегулировать вопрос с рейдерством. Это для него большая субсидия государства чем мифическая дотация. Опричь того, я поддерживаю идею стимулирования выращивание КРС, если царство дотирует каждую голову выращиваемого скота. Только эта мысль пока, к сожалению, донельзя слабо заработала.

    — Вы не боитесь, который впоследствии ваших заявлений навстречу вас выступит жена рынка?

    — 90 процентов рынка выступает напротив нынешней модели. И 100% рынка понимает, который главная задача для ныне не дотация, а инфраструктура, которая ежедневный дает сбои и налог силовиков.

    — Хорошо, куда желание вы направили 4 миллиарда, которые запланированы для дотации?

    — Обрубок денег должна дождь для поддержку выращивания КРС. Все остальное — должно двигаться для удешевление кредитов, которые безотлагательно являются неподъемными и чтобы крупного и чтобы мелкого производителя. Опричь того, княжество должно предложить свое призрак того, наподобие принужден казаться выше огулом АПК посредством 10-15 лет, и под него нужно подстраивать абсолютно всетаки, включая дотациями.


  44. Hey very cool website!! Man .. Beautiful .. Amazing .. I’ll bookmark your blog and take the feeds also…I’m happy to find so many useful information here in the post, we need develop more strategies in this regard, thanks for sharing. . . . . .

  45. Hello there,

    My name is Aly and I would like to know if you would have any interest to have your website here at promoted as a resource on our blog ?

    We are in the midst of updating our broken link resources to include current and up to date resources for our readers. Our resource links are manually approved allowing us to mark a link as a do-follow link as well
    If you may be interested please in being included as a resource on our blog, please let me know.


  46. [url=][/url][url=]paydayloansnearme[/url][url=][/url][url=][/url][url=][/url][url=][/url][url=]adultonlinewebcams[/url][url=][/url][url=][/url][url=]torssexdvd[/url][url=][/url][url=][/url][url=][/url][url=][/url][url=][/url][url=http://www.xn--80aidrd5bg.xn--p1ai/index/8-23116][/url][url=][/url][url=][/url][url=][/url]

  47. [url=]cialis on line[/url] [url=]tetracycline[/url] [url=]Lasix[/url] [url=]lisinopril tabs[/url] [url=]proventil for sale[/url] [url=]viagra[/url] [url=]buy propecia[/url] [url=]robaxin[/url] [url=]generic viagra mastercard[/url]

  48. I and my pals were actually following the excellent points on the blog and so the sudden got an awful suspicion I had not expressed respect to the website owner for those secrets. The guys became as a result passionate to read them and have in actuality been taking pleasure in these things. Thanks for turning out to be considerably accommodating and for utilizing certain marvelous issues millions of individuals are really desperate to know about. Our own honest regret for not expressing gratitude to sooner.

  49. I’m extremely inspired with your writing abilities and also with the structure to your blog. Is this a paid subject or did you customize it yourself? Either way stay up the excellent high quality writing, it’s rare to look a nice weblog like this one nowadays..

  50. I’m really impressed with your writing skills and also with the layout on your blog. Is this a paid theme or did you modify it yourself? Either way keep up the excellent quality writing, it’s rare to see a great blog like this one nowadays..

  51. Hi, Neat post. There’s a problem together with your site in web explorer, would test this… IE nonetheless is the marketplace chief and a good component of other folks will pass over your excellent writing due to this problem.

  52. I have recently started a blog, the info you offer on this site has helped me greatly. Thanks for all of your time & work. “The achievements of an organization are the results of the combined effort of each individual.” by Vince Lombardi.

  53. What i don’t realize is in truth how you’re no longer really a lot more well-liked than you may be now. You are very intelligent. You understand therefore considerably with regards to this matter, produced me for my part imagine it from a lot of various angles. Its like men and women are not involved except it is something to accomplish with Lady gaga! Your own stuffs great. Always take care of it up!

  54. Aw, this was a very nice post. In idea I wish to put in writing like this additionally – taking time and precise effort to make an excellent article… however what can I say… I procrastinate alot and under no circumstances appear to get something done.

  55. Excellent post. I was checking constantly this blog and I am impressed! Very useful info specially the last part 🙂 I care for such info much. I was looking for this particular information for a very long time. Thank you and good luck.

  56. naturally like your website but you have to check the spelling on quite a few of your posts. Many of them are rife with spelling problems and I find it very troublesome to tell the truth nevertheless I will certainly come back again.

  57. It is perfect time to make a few plans for the future and it is time to be happy. I’ve read this submit and if I may I want to suggest you some attention-grabbing issues or advice. Perhaps you could write next articles referring to this article. I wish to read even more things approximately it!

  58. Thanx for the effort, keep up the good work Great work, I am going to start a small Blog Engine course work using your site I hope you enjoy blogging with the popular you express are really awesome. Hope you will right some more posts.

  59. Good blog! I truly love how it is easy on my eyes and the data are well written. I am wondering how I might be notified whenever a new post has been made. I’ve subscribed to your RSS which must do the trick! Have a great day!

  60. I¦ve been exploring for a little for any high-quality articles or weblog posts in this kind of space . Exploring in Yahoo I finally stumbled upon this web site. Reading this info So i am satisfied to exhibit that I’ve an incredibly just right uncanny feeling I discovered just what I needed. I such a lot indisputably will make certain to do not forget this web site and provides it a glance regularly.

  61. Hello would you mind stating which blog platform you’re using? I’m planning to start my own blog soon but I’m having a difficult time choosing between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design and style seems different then most blogs and I’m looking for something completely unique. P.S Sorry for getting off-topic but I had to ask!

  62. Thanks for sharing superb informations. Your site is very cool. I am impressed by the details that you’ve on this web site. It reveals how nicely you perceive this subject. Bookmarked this web page, will come back for more articles. You, my friend, ROCK! I found simply the information I already searched all over the place and simply could not come across. What a perfect web-site.

  63. I have been exploring for a little bit for any high quality articles or blog posts on this sort of house . Exploring in Yahoo I at last stumbled upon this web site. Studying this info So i am satisfied to convey that I have an incredibly good uncanny feeling I found out exactly what I needed. I most indubitably will make certain to don¦t fail to remember this web site and give it a glance regularly.

  64. Great beat ! I would like to apprentice while you amend your website, how could i subscribe for a blog web site? The account aided me a acceptable deal. I had been tiny bit acquainted of this your broadcast provided bright clear concept

  65. Just wanna input on few general things, The website design is perfect, the subject material is real good. “War is much too serious a matter to be entrusted to the military.” by Georges Clemenceau.