View Full Version : code & script

23-05-2002, 02:16 PM
yonks ago I wrote 'code' for COBOL progs. Big gap then back to computers and hear all about 'script'. 'Scuse me if dumb question but are they the same thing?

23-05-2002, 02:46 PM

Almost. 'Code' is usually something that is entered in and compiled to create a new program etc. A script however is text based that is accessed from something (eg a website) and the text 'script' is run to perform a certain task. The script is not compiled.

I think that's pretty correct.


23-05-2002, 03:11 PM
HTML pages are written in HTML code. Often they include Scripts written in either Javascript or VBScript.

Basically they are mini programs that don't need compiling as the browsers interpret and run them.

VBScript is loosely based on Visual Basic - a full programming language.

Javascript is the one most commonly seen on the web as Netscape isn't set up to read VBScript by default.

24-05-2002, 04:38 PM
There are great similarities between COBOL code and scripts ... they are both verbose, have filthy syntax, and use huge amounts of CPU cycles. ;-) .

25-05-2002, 10:20 AM
Thanks to you all but the dif. between code and script is not whether or not compiled, eh? because plenty of code is interpreted too. Maybe 'script' is shorthand for 'little bits of code that perform a subroutine or are embedded like Javascript in HTML'. Maybe the distinction is more in function, than structure. Maybe it's just semantics, but thanx anyway.