Definition of the word subroutine

Pronunciation of vocabulary subroutine

subroutinenoun

chương trình con

/ˈsʌbruːtiːn//ˈsʌbruːtiːn/

Origin of the word subroutine

The term "subroutine" in computer programming refers to a self-contained block of code that can be reused multiple times within a larger program. The origins of the word "subroutine" can be traced back to the early days of digital computing, specifically the 1950s. In early computers, programs would execute a sequence of instructions in a linear fashion, which made it challenging to reuse common code snippets. Programmers realized that they could break down larger programs into smaller, reusable sub-programs or "subroutines" that could be called upon when needed, making the overall program more efficient and easier to maintain. The word "subroutine" itself can be broken down as follows: "sub" meaning lower or below, and "routine" meaning a sequence of instructions. Subroutines are called from within the main program, and their execution is considered to be "subordinated" (or "subroutine'd") to that of the main program. In summary, the term "subroutine" represents a crucial programming concept that allows for code reusability, efficiency, and maintainability.

Vocabulary summary subroutine

typeDefault

meaningsubroutine, subroutine

typeDefault_cw

meaning(computer) subroutine

meaningchecking s. test subroutine

meaninginput s. subroutine input

Example of vocabulary subroutinenamespace

  • In order to optimize the program's efficiency, the developer inserted a subroutine that calculates prime numbers.

    Để tối ưu hóa hiệu quả của chương trình, nhà phát triển đã chèn một chương trình con tính toán số nguyên tố.

  • After debugging the main function, the programmer tested the subroutine for random number generation.

    Sau khi gỡ lỗi chức năng chính, lập trình viên đã kiểm tra chương trình con để tạo số ngẫu nhiên.

  • The subroutine for file input/output is called repeatedly to transfer data between the file and the program.

    Chương trình con nhập/xuất tệp được gọi nhiều lần để truyền dữ liệu giữa tệp và chương trình.

  • The program's error-handling subroutine handles unexpected input and displays an appropriate error message.

    Chương trình con xử lý lỗi của chương trình sẽ xử lý dữ liệu đầu vào không mong muốn và hiển thị thông báo lỗi phù hợp.

  • The subroutine for searching through the addressed data saves a significant amount of time compared to the main function.

    Chương trình con tìm kiếm qua dữ liệu được định địa chỉ giúp tiết kiệm đáng kể thời gian so với hàm chính.

  • The subroutine for calculating the Fibonacci sequence is a recursive function that has a high computational cost.

    Chương trình con để tính dãy số Fibonacci là một hàm đệ quy có chi phí tính toán cao.

  • The user interface subroutine displays the graphical interface and handles user input.

    Chương trình con giao diện người dùng hiển thị giao diện đồ họa và xử lý dữ liệu đầu vào của người dùng.

  • The encryption subroutine performs complex mathematical operations to encrypt the data using a predefined algorithm.

    Chương trình con mã hóa thực hiện các phép toán phức tạp để mã hóa dữ liệu bằng thuật toán được xác định trước.

  • The subroutine for connecting to and querying the database handles the database connections efficiently.

    Chương trình con dùng để kết nối và truy vấn cơ sở dữ liệu xử lý các kết nối cơ sở dữ liệu một cách hiệu quả.

  • The subroutine for generating graphics handles various types of charts and diagrams based on the user's input.

    Chương trình con tạo đồ họa xử lý nhiều loại biểu đồ và sơ đồ khác nhau dựa trên thông tin đầu vào của người dùng.


Comment ()