什么是脚本语言? 脚本语言有什么用

经常说什么什么脚本语言。但是不知道到底是个什么呢?与一般的编程语言有什么区别呢?

给出几个版的解释!

脚本语言脚本语言(Script languages,scripting programminglanguages,scriptinglanguages)是为了缩短传统的编写-编译-链接-运行(edit-compile-link-run)过程而创建的计算机编程语言。此命名起源于一个脚本“screenplay”,每次运行都会使对话框逐字重复。早期的脚本语言经常被称为批处理语言或工作控制语言。一个脚本通常是解释运行而非编译。虽然许多脚本语言都超越了计算机简单任务自动化的领域,成熟到可以编写精巧的程序,但仍然还是被称为脚本。几乎所有计算机系统的各个层次都有一种脚本语言。包括操作系统层,如计算机游戏,网络应用程序,字处理文档,网络软件等。在许多方面,高级编程语言和脚本语言之间互相交叉,二者之间没有明确的界限。一个脚本可以使得本来要用键盘进行的相互式操作自动化。一个Shell脚本主要由原本需要在命令行输入的命令组成,或在一个文本编辑器中,用户可以使用脚本来把一些常用的操作组合成一组序列。主要用来书写这种脚本的语言叫做脚本语言。很多脚本语言实际上已经超过简单的用户命令序列的指令,还可以编写更复杂的程序。

百度版:
1.脚本语言(JavaScript,VBscript等)介于HTML和C,C++,Java,C#等编程语言之间。

HTML通常用于格式化和链结文本。而编程语言通常用于向机器发出一系列复杂的指令。

2.脚本语言与编程语言也有很多相似地方,其函数与编程语言比较相象一些,其也涉及到变量。与编程语言之间最大的区别是编程语言的语法和规则更为严格和复杂一些.

3.与程序代码的关系:脚本也是一种语言,其同样由程序代码组成。

注:脚本语言一般都有相应的脚本引擎来解释执行。他们一般需要解释器才能运行。JAVASCRIPT,ASP,PHP,PERL,Nuva都是脚本语言。C/C++编译、链接后,可形成独立执行的exe文件。

4.脚本语言是一种解释性的语言,例如vbscript,javascript,installshieldscript等等,它不象cc++等可以编译成二进制代码,以可执行文件的形式存在.
什么是脚本语言? 脚本语言有什么用

脚本语言不需要编译,可以直接用,由解释器来负责解释。

5.脚本语言一般都是以文本形式存在,类似于一种命令.

举个例子说,如果你建立了一个程序,叫aaa.exe,可以打开.aa为扩展名的文件.

你为.aa文件的编写指定了一套规则(语法),当别人编写了.aa文件后,你的程序用这种规则来理解编写人的意图,并作出回应.那么,这一套规则就是脚本语言.

英文版
scripting language
(skript磇ng lang磄wij) (n.) A high-levelprogramming language that is interpretedby another program at runtime ratherthan compiled by thecomputer’s processor as other programming languages (such asC and C++) are.Scripting languages, which can be embedded within HTML, commonly areused to add functionality to aWeb page, such as different menu styles or graphic displaysor to serve dynamicadvertisements. These types of languages are client-sidescripting languages, affecting the data that the end usersees in a browser window.Other scripting languages are server-sidescripting languages that manipulate the data, usually in adatabase, onthe server.

Scripting languages came about largely because of thedevelopment of the Internet as a communications tool. JavaScript,ASP,JSP,PHP,Perl,Tcl andPythonare examples of scripting languages.



专业版

什么是脚本语言

现代的脚本语言的前身主要来自两个方面:其一是命令解释器或传统批处理和“终端”(命令行)计算的外壳语言;另一集合中包含着各种各样的文本处理和报表生成工具。第一个集合中的例子包括IBM的JCL、MS-DOS的command解释器,以及Unix的sh和csh外壳族等。第二个集合里的例子包括IBM的RPG,以及Unix的sed和awk等。从这些应用中演化出的Rexx,即IBM的“重构的可扩充执行器”,时间可以追溯到1979年;还有Perl,由LarryWall于20世纪80年代后期开始设计,现在已成为使用最广泛的通用脚本语言。其他通用的脚本语言包括Tcl(“tickle”)、Python、Ruby、VBScript(用在Windows)和AppleScript(用于Mac)。

随着万维网在20世纪90年代后期以来的迅猛发展,Perl被广泛用于做“服务器端”的万维网脚本,web服务器(在服务器机器上)执行各种Perl程序去生成网页的内容。有一位名叫RasmusLerdorf的早期web脚本信徒,他创建了一集脚本用于跟踪对他的个人网页的访问。这些东西原来是用Perl写的,后来被重新设计为一种羽翼丰满的独立语言。从这些脚本演化出PHP,现在成为服务器端web脚本方面最流行的平台。PHP的竞争者包括JSP(JavaServerPages)和微软的平台VBScript。就客户端计算机而言,所有浏览器都实现了JavaScript。这是一种由Netscape公司于90年代中期开发的语言,后由ECMA(欧洲标准化组织)在1999年标准化[ECM99]。

JohnOusterhout(Tcl的发明人)在其有关脚本的经典论文 [Ous98]中说到,“脚本语言假定现存一集用其他语言写出的有用组件,它们的意图不是从空白开始写应用,而是去组合这种组件。”Ousterhout预见未来的程序员将在他们系统的


讨论版

The origin of the term was similar to its meaning in "a moviescript tells actors what to do": a scripting language controlled theoperation of a normally-interactive program, giving it a sequenceof work to do all in one batch. For instance, one could puta series of editing commands in a file, and tell an editor to runthat "script" as if those commands had been typed interactively.This usage was generalized under Unix to describe scripts for theshell to execute, which meant that the running of a whole series ofprograms was controlled, not just one. Thus "shell script". Asprogrammable features of shells became more and more powerful(BourneShell,CeeShell), they beganto resemble traditional interpreted languages such as Lisp (orperhaps Basic is a better comparison), which had never beenpreviously called ScriptingLanguages.Because of this evolution, more recent usage has changed thecurrent definition to be much fuzzier, but "scripting languages"generally have these properties:
  • The PreferredSyntax of thelanguage is used for things like program invokation, I/Oredirection, file/directory manipulation, and jobcontrol/pipelining. More mundane things like arithmetic may requiremore difficult syntax, or may be unsupported by the languagealtogether (and require use of a separate application). This ismore true of the classic Unix shells (BourneShell, CeeShell, KornShell) than it is ofmore modern (and general-purpose) scripting languages like PerlLanguage or PythonLanguage.
  • There is nonetheless some argument to be made to limit the termScriptingLanguage tocases where the language is primarily used to control the operationof one or more programs - however in some cases there is no sharpline. Perl, for instance, is often used for that purpose (whereshell scripts would otherwise be used), but is now also used formany very different purposes, such as intensive regex matching,text manipulation, file editing, etc. Similarly LispLanguage is still notusually called a ScriptingLanguage,but the elisp dialect's purpose in life is to script the EmacsEditor, so it couldcertainly be called a ScriptingLanguage.Examples

      

    爱华网本文地址 » http://www.aihuau.com/a/25101017/350493.html

    更多阅读

    什么是小米F码&小米F码有什么用? 小米手环2f码是什么

    什么是小米F码&小米F码有什么用?——简介 在小米论坛经常会看到“参加××活动,获得F码”之类的帖子。那么,到底什么是F码?它又有什么用呢?什么是小米F码&小米F码有什么用?——什么是小米F码?什么是小米F码&小米F

    移动电源是什么,有什么用? 移动电源是什么电池

    移动电源是什么,有什么用?——简介可能还有许多的朋友不知道移动电源是什么,有什么用。今天就给大家简单的介绍一下。移动电源是什么,有什么用?——移动电源介绍:移动电源是什么,有什么用? 1、随着科技越来越发达,数码产品功能日益多样化

    晨脂是什么?晨脂有什么好处? 每天晨跑有什么好处

    晨脂是什么?晨脂有什么好处?——简介晨脂指的是植物经过一夜分泌出的油脂,早上采集所得。脂,对于植物而言是植物分泌出的油。晨脂是什么?晨脂有什么好处?——方法/步骤晨脂是什么?晨脂有什么好处? 1、晨脂要在早上采集,此时晨脂比较干净,没有

    dnf智力有什么用? dnf智力是加什么的

    dnf智力有什么用?1、智力越高,魔攻越高,到后期一点智力可以换2.5左右的魔攻2、直接影响一些技能的伤害,像鬼泣觉醒只与智力有关。3、智力对与物功型,例如大枪,红眼是没用的 对于魔功的,智力越高伤

    声明:《什么是脚本语言? 脚本语言有什么用》为网友原味猛男分享!如侵犯到您的合法权益请联系我们删除