当前位置: 代码迷 >> J2SE >> What's the difference between a programming language, a scripting language, and a markup language?该怎么解决
  详细解决方案

What's the difference between a programming language, a scripting language, and a markup language?该怎么解决

热度:335   发布时间:2016-04-24 17:51:37.0
What's the difference between a programming language, a scripting language, and a markup language?
不好意思,没有找到法帖的地方。
借个地方哈!
this   artical   is   from:
http://www.answerbag.com/q_view/948
-----------------------------
Top   Answer   out   of   3  

The   primary   difference   between   a   "programming   language "   (C,   C++,   VB   etc.)   and   a   "scripting   language "   (PHP,   ASP,   JSP,   JavaScript,   VBScript)is   that   code   written   in   a   programming   language   needs   to   be   compiled   before   it   is   run.   Once   it   is   compiled,   it   can   be   run   any   number   of   times.

Scripting   languages,   on   the   other   hand,   are   interpreted   at   run-time.   This   means   that   every   time   you   want   to   run   the   program,   a   separate   program   needs   to   read   the   code,   interpret   it,   and   then   follow   the   instructions   in   the   code.   Compiled   code   has   already   been   interpreted   into   machine   language,   so   it   is   will   typically   execute   faster   because   the   conversion   into   machine   language   has   already   been   done.  

Markup   languages   (HTML,   XML)   are   somewhat   different   from   both   of   the   others.   A   markup   language   is   simply   a   set   of   tags   that   are   used   to   "mark   up "   text   documents   so   that   sections   of   text   can   be   logically   arranged   and   labeled.   These   documents   can   be   viewed   as   plain   text,   or,   more   commonly,   are   viewed   through   a   browser.   The   browser   parses   the   document,   looking   for   markup   tags,   and   it   then   arranges   the   text   and/or   formats   it   according   to   the   values   in   the   tags.
-----------------
Answer   2   out   of   3  

The   answer   is   basically   correct,   but   here   are   a   few   modifications:

Not   all   programming   languages   are   compiled   the   same.   C/C++   and   VB   are   compiled   languages,   Java   can   be   considered   compiled   or   not   depending   on   your   definition   of   compiled.   Perl   is   interpretted   and   very   much   considered   a   language...   there   are   others   that   fall   into   this   category   as   well.

ASP   is   a   construct   of   JScript,   VBScript   or   C#   and   is   not   really   a   language   as   much   as   a   way   of   using   a   language   for   server   side   development.
JSP   is   a   shortcut   method   for   developing   servlets.   JSP   pages   are   converted   to   Java   source   code   and   then   compiled   into   servlets.
  相关解决方案