TAILIEUCHUNG - HandBooks Professional Java-C-Scrip-SQL part 227

Tham khảo tài liệu 'handbooks professional java-c-scrip-sql part 227', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 2. Language Basics Operators Ruby supports a rich set of operators as you d expect from a modern language. However in keeping with Ruby s object-oriented nature most operators are in fact method calls. This flexibility allows you to change the semantics of these operators wherever it might make sense. Operator Expressions Most operators are actually method calls. For example a b is interpreted as a. b where the method in the object referred to by variable a is called with b as its argument. For each operator - A there is a corresponding form of abbreviated assignment operator - etc. Here are the operators shown in order of precedence highest to lowest unary - unary - A ----------------------- and abbreviated assignment operators such as - etc. not and or Nonmethod operators The following operators aren t methods and therefore can t be redefined . not and or - and other abbreviated assignment operators ternary operator Range operators Range operators function differently depending on whether or not they appear in conditionals if expressions and while loops. In conditionals they return true from the point right operand is true until left operand is true exprl . expr2 Evaluates expr2 immediately after exprl turns true. exprl . expr2 Evaluates expr2 on the iteration after exprl turns true. In other contexts they create a range object exprl . expr2 Includes both expressions exprl x expr2 exprl . expr2 Doesn t include the last expression exprl x expr2 Logical operators If the value of the entire expression can be determined with the value of the left operand alone the right operand isn t evaluated. and Returns true if both operands are true. If the left operand is false returns the value of the left operand otherwise returns the value of the right operand. II .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.