-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Robert MacGregor edited this page Jun 9, 2021
·
2 revisions
Below is the status of all key features of a Torque Script language. Please note if something says 'implemented' it does not necessarily mean that said implementation is set in stone - it may change if the need should arise pre-release. The C++-APIs associated with some entries is heavily' work-in-progress as well.
Feature Name | Status | Sample |
---|---|---|
Break Keyword | Implemented; implementation detail does not match T2 | for (%i=0;%i<10;%i++) { break; } |
Continue Keyword | Not Implemented | for (%i=0;%i<10;%i++) { continue; } |
Console Object Instantiation | Implemented; Untested | new FileObject(Handle); Handle.openForRead("test.txt"); |
Console Object Member Fields | Not Implemented | |
Datablocks | Not Implemented | datablock PlayerData(LightMaleHumanArmor) { ... } |
Local Variables | Implemented | %local = 50; |
Local Arrays | Implemented | %local[1, 3.14, "A"] = 123; |
Global Variables | Implemented | $global = 50; |
Global Arrays | Implemented | %local[1, 3.14, "A"] = 123; |
Basic For Loop | Implemented | for (%i=0;%i<10;%i++) { echo(%i); } |
While Loop | Implemented | %i=0; while(%i<10){ echo(%i); %i++; } |
If | Implemented | if (%result == -1) { echo("Error"); } |
else if | Implemented | if (%result == -1) { echo("Error"); } else if (%result == 2) { echo("Other Condition"); } |
else | Implemented | if (%result == -1) { echo("Error"); } else { echo("Success"); } |
switch | Implemented | switch (%result) { case $global: echo("Good"); default: echo("Default"); } |
Arithmetic | Mostly Implemented; Some Ops Missing | %local = 0; %result = %local + 50; |
Bitwise Operators | Not Implemented | echo(2 & 4); |
Subfields | Not Implemented | new FileObject(Handle); Handle.myField = 50; |
SubArrays | Not Implemented | new FileObject(Handle); Handle.myArray[1,2,3] = 4; |
Static Memory Globals | Started | $my::static::memory::global = 123; |
File Object API | Started | new FileObject(Handle); Handle.openForWrite("out.txt"); |
Vector Math API | Not Implemented | %vector = "1 1 1"; echo(vectorAdd(%vector, "1 1 1")); |
Math API | Not Implemented | echo(mSqrt(50)); |
String API | Not Implemented | echo(getWord("A B C", 1)); |
Packages | Implemented | package Test { function Test() { } }; |
Package API | Started | activatePackage(Test); |