> For the complete documentation index, see [llms.txt](https://mikkicoding.mikkipastel.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mikkicoding.mikkipastel.com/introduction-of-programming/02-intro-computer-translate.md).

# การแปลภาษาของโปรแกรม

การแปลภาษาของโปรแกรม มี 2 แบบ คือ

![](/files/LTfDDvlASQu2Bu3YLeKU)

* **Interpreter** เป็นการแปลคำสั่งทีละบรรทัดก่อนที่โปรแกรมจะทำงาน เมื่อพบข้อผิดพลาด โปรแกรมจะหยุดทำงานทันที ทำให้โปรแกรมทำงานค่อนข้างช้า เช่น ภาษา python
* **Compiler** เป็นการแปลคำสั่งทั้งโปรแกรม ถ้าพบข้อผิดพลาด โปรแกรมจะแสดงข้อผิดพลาดออกมา ทำให้โปรแกรมทำงานได้เร็วกว่า เช่น ภาษา C
