|
| SG Script Version 2.1.37,3.4.14, Release Date: October 01, 2003, Made by Mark Okun
This applet is a demo version. Many features of SG Script is not implemented in the applet
version to not violate Java security system.
Contents
| |
History of SG Script
When I learned C++ (it was many years ago) I had project: create simple interpreted language.
It was very useful project for me. Therefore when I started learn Java I decided
recreate this language using Java.
This language was simuliar to C but many features of C were missing.
Therefore I named it C-- or CScript. But later I found out that these names are used.
After that I changed name to to SG Srcipt.
| |
 Rules
- Difference between C and SG Script:
| Topic | C | SG Script |
| Preprocessor | Yes | No |
| Structure | Yes | No |
| Pointers | Yes | No |
| Array | Yes | No |
| Comments /*...*/ | Yes | No |
| Loop do ... while | Yes | No |
| Loop for | Yes | No |
| Switch ... case | Yes | No |
| Predefine variables | Yes | No |
- C and SG Script have different functions.
| |
Examples
This is example of a program written in SG Script:
print("This is a demo");
// In SG Script user don't need
// predefine variable
x = 0;
y = 2;
while(x < 10){
x = x + 1;
y+=2;
}
print ("x=",x,"y=",y);
print (x2(y));
// In SG Script you can use functions
x2(y)
{
return (y*y);
}
| |
|