Programming Reference Manual
 
StringClass Overview
 
Embedded in the TRADIUM Basic Script language is a special type of a string variable, StringClass, which operates as a class. This type of string is especially designed for high performance string handling, like concatation. Also, it allows string manipulation without the need of addional helper string variables.
 
A StringClass type variable stores string values in a internal text buffer. All operations affect this buffer. The buffer is automatically initialized when the variable is declared and when a value is assigned to the variable, either by the .Append, .AppendLine or .Value methods and property.
 
 
Sub Main
 
   Dim Str1 As String
   Dim Str2 As New StringClass
 
   Str1 = "Hello, world!"
   Str2 = "Hello, world!"
 
   MsgBox Str1
   MsgBox Str2
 
End Sub
 
Because StringClass was designed as a Class, the declaration of a StringClass variable differs from the declaration of a native string. See the example, shown on the left:


 
Sub Main
 
   Dim Str1 As String
   Dim Str2 As StringClass
 
   Set Str2 = New StringClass
 
   Str1 = "Hello, world!"
   Str2 = "Hello, world!"
 
   MsgBox Str1
   MsgBox Str2
 
End Sub
 
The New keyword is required, because a new instance of the StringClass object needs to be created. It is also possible to use the following alternative declaration for the Str2 variable from the example above. See this example: