> 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 แบบ คือ

![](https://3795885741-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnrRjTHjqSPyP5ScepCIU%2Fuploads%2F8hcv77Ma6t46wEGBTaJS%2Fintroduction_programming_01.jpeg?alt=media\&token=0640bd92-5cf6-4cee-b71a-f1b6a1613347)

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