English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

How are scripts created, I guess is what I'm asking? Like, what is the language creator doing behind the scenes in order to make a computer recognize a function?

2006-06-23 02:59:34 · 4 answers · asked by jthreattix 3 in Computers & Internet Programming & Design

(edit:) I figured this might've happened, and that's okay, but I wasn't too concerned about what's going on during runtime, rather, I wondering how the language is even created; how is it "born?" (i.e. "I'm going to create an operation so that when I click this button, X happens, but wait! ...I have to create a new term so that the computer can understand how to do this.) Does this make sense? Because I had a hard time trying to figure out to ask the question, myself.

2006-06-23 04:20:35 · update #1

4 answers

At the heart every scripting language is built on top of other scripting languages.

A processor can only understand machine language or binary. Each CPU can have it's own machine language format.

As someone mentioned it takes an interpreter (or some languages get 'compiled') to translate one language into another so eventually any programming language gets interpreted down to a machine language form and sent to the processor.

It's pretty near impossible to write in binary so instead programs are written in Assembly languages which use simple words to refer to instructions. Assembly languages get interpreted into machine language for the processor.

assembly languages can be considered low level programming languages. Languages can go to medium and then to high and very high.

Scripting languages like php, asp, action script could be considered very high level meaning that they are fairly far removed from binary machine language. Eventually though they all send machine language instructions to a CPU.

If you were to create a language you would need to build it on top of another (lower) language and have the instructions interpreted into machine language.

2006-06-23 06:23:39 · answer #1 · answered by Anonymous · 0 0

Hi,

Lets take the example of JavaScript.. a cool scripting lagauage which is supported by allmost all browsers...

You can create a JavaScript in any text editor and save it with .js extension... The browser has interpretor, that interprets the .js file and loads it and when there is for example any user interaction, the respective function is called...

This script is downloaded to the client machine by the browser and is executed on the client side...

JavaScript is a important part of AJAX.. the programming technique which has really spread like a wild fire in the recent years...

This is very basic information.. may be not to the point.. but I hope it is of some help...

Cheers!!!
jAY

2006-06-23 10:22:06 · answer #2 · answered by jAY 2 · 0 0

The operating system allows programs to run. You can create stand alone programs in C/C++, VisualBasic and others. One type of program you can create is a custom programming language. As mentioned previously JavaSecript is one such language that is included in web browsers.

So now using VB you create MySuperDuperScripter .exe Your new custom programming language. You create a command such as showDate(). You need MySuperDuperScripter to be able to accept instructions such as by reading a text file. As MySuperDuperScripter reads the text file it finds showDate() and does what you as a language creater want it to do ANS=>6/23/2006 .

So you have Operating system =>runs=>MySuperDuberScripter.exe =>runs=>MytestScript.txt

2006-06-23 11:38:08 · answer #3 · answered by fwiiw 4 · 0 0

Every script is read by a so-called "interpreter" at runtime. For this reason, a script can be a text file and you don't have to compile it because it is read and interpreted by another program.

2006-06-23 10:06:42 · answer #4 · answered by dieterdobbelaere 2 · 0 0

fedest.com, questions and answers