realy? can you give some examples of such differences between the sci-studio syntax and the original sci syntax?
Funny you should ask. I just started writing this a couple days ago while working on the decompiler:
Sierra's SCI Language vs. SCI Studio Language
Temporary and Param Variables
=============================
In SCI Studio's Language, the parameter variables are specified at the top of the function declaration, and the function's temporary variables are declared within the function block. In Sierra's SCI Language, both variables were declared in the function declaration, with the temporary variable separated and declared with a "&tmp" keyword.
SCI Studio:
(method (changeState newState)
(var whichSkill, oldGold)
...
)
Sierra's SCI:
(method (changeState newState &tmp whichSkill oldGold)
...
)
Procedures
==========
Sends
=====
SCI Studio:
(StatusLine:
code(endStatus)
enable()
)
(send cSound:stop())
Sierra's SCI:
(StatusLine
code: endStatus,
enable:
)
(cSound stop:)
Object Names
============
Simple immediate name declaration even if the name is non alphanumeric.
SCI Studio:
(instance {glory1.sav} of File
(properties)
)
Sierra's SCI:
(instance heroinfo of File
(properties
name {glory1.sav})
)
Switch Statements
=================
SCI Studio's switch statements use clearer case definitions and allow an unlimited amount of calculations in a case comparison.
(switch (= state newState)
(case (1)
...
)
(case (2)
...
)
)
(switch (= state newState)
(1
...
)
(2
...
)
)
The &rest Opcode
================
The rest opcode is a very versatile feature that was underutilized in Sierra's SCI language. In SCI Studio, you can "rest" from any parameter you like at any time.
SCI Studio:
(method (init params)
(super:init(rest params)
...
)
Sierra's SCI:
(method (init)
(super init: &rest)
...
)
Strings
=======
SCI Studio encloses all strings in quotes (ie. "string"). External strings in text resources are manually specified by text resource number and index. In Sierra's SCI Language, if a string was specified in quotes, it was automatically placed in the text file, otherwise, embedded strings used curly braces (ie. {string}), and spaces needed to be specified as "_".
SCI Studio:
Print(
"Do you want to try importing your character again?" // (or '805 123' for text.805)
#button "Yes" 1
#button " No " 0
)
Sierra's SCI:
(Print
"Do you want to try importing your character again?"
#button: {Yes} 1
#button: {_No_} 0
)
Notes
=====
Sierra generally places any game strings/text such as dialog text in the text resource files, and any UI text, such as button names, window titles and menu item text embedded in the script resources.