The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 01-20-2004
cbkihong cbkihong is offline
Moderator
 

Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,422
What do you mean exactly?

Are you curious as to why some programs, like text editors manage to identify which programming language a piece of code represents? File extension, or even existence of certain keywords particular to a language can help identify the programming language used with a bit of parsing. After all, these are all heuristic methods that practically works quite well with sometimes quite accurate guesses but they are not necessarily correct.

I don't think Unix by itself recognizes the language used. For example, if you want to compile a C program you need to explicitly invoke 'cc'; while for a Perl program you need to invoke 'perl' (or as the top shebang line). There is no mystery in there.