Language Elements

shortx (Alternative text syntax for Superx++)
shortx Superx++ can be written in a text based syntax much like the C family of languages. This syntax is called shortx because it dramatically shortens the amount of Superx++ one has to read or write.

XML-Compliance
parseable by any XML parser Superx++ can be parsed by any XML parser-- useful in examining a program's structure even without the run-time engine
transportable as XML since Superx++ is XML-compliant it can be transported via the same protocols and methods used for XML: e.g. HTTP, SOAP, SMTP, etc.
ubiquitous as XML since Superx++ is XML-compliant it can be parsed anywhere and on any platform-- although the actual processing requires a run-time engine implementation
XML version 1.0 compliant Superx++ is 100% XML version 1.0 compliant

Features of Superx++
class deletion the ability to delete a class at run-time to conserve class memory as well as to radically alter the behaviour of previously instantiated objects of the class
class redefinition the ability of a class to be redefined at run-time so that subsequently instantiated objects have different properties and/or behaviour from previously instantiated objects of the redefined class
conditional class definition the ability of a class to be defined or redefined based on a certain set of conditions being met-- in such a manner it is possible to implement a class in many different ways based on run-time conditions; thereby creating class polymorphism
conditional inclusion the ability of a program file to be included in another program only if certain conditions are met-- an useful feature of preventing the inclusion of unwanted files
courier messaging the ability to send a Superx++ object as a simple intelligent agent to a remote machine to execute requests. Such courier messengers are able to handle errors and runtime conditions using conditional logic. The result is reduced network traffic because all the simple requests are handled by the courier object at the destination machine before the result of the entire mission is sent back to the sender.
customized instantiation the ability of an object to be instantiated with mutations from the general class definition-- an useful way of modeling exceptional situations that arise in real life or real systems.
external library support the ability to invoke an external library (.dll functions) from within a Superx++ program.
method class definition the ability of a class to be defined and later redefined within a method of another class-- an useful way of implementing temporary typing and it conserves class memory
object reclassification the ability of an object to change classes so as to gain different properties or behaviour
partial inclusion the ability to include only specific parts of a program file-- an useful feature for preventing the inclusion of complete files when only parts of them are wanted
render memory as XML the run-time memory can be rendered as XML and saved to a file just like any other node-- an extremely useful aid in debugging and monitoring what is going on
render class memory as XML the run-time class memory can be rendered as XML and saved to a file just like any other node-- an extremely useful aid in debugging and monitoring what is going on
relational to object data conversion the ability to access relational database data and generate Superx++ objects from it
relational to XML data conversion the ability to access relational database data and convert it into parts of existing or new XML documents
save and reload program state the ability of a program to save its current state at run-time so it can be reloaded later from the exact spot where it saved its state
self-modification the ability of a program to modify itself at run-time lending itself to adaptive behaviour
simultaneous object access and manipulation the ability to access multiple objects at the same time as well as to simultaneously invoke the same members or methods on them
XML data abstraction the ability to encapsulate XML data in a special tier level with Superx++ objects providing access and manipulation services (to XML data) for clients
XML encapsulation the ability to encapsulate XML data in Superx++ objects
XML manipulation the ability to easily manipulate XML data
XML serialization and deserialization the ability to render and save Superx++ objects as XML and the ability to create objects in run-time memory from XML data
XML to relational data conversion the ability to traverse an XML document or part of it and update relational database tables with the data
Superx++ services the simple implementation of web services using only HTTP, XML and Superx++

Basic Items
class a class is a type that can implement functions (methods)
escape sequences special combinations of characters used to represent characters that cannot otherwise be written as is due to XML and other parsing constraints
inheritance the ability of a class to derive its properties and behaviour from another class and the derivation of such properties and behaviour by objects
instantiation creation of an object of a class
node a Superx++ node is an object-- the terms are used interchangeably
a particular entity within a tree
object an object is a particular entity which belongs to a class
run-time class memory all class definitions are stored in the run-time class memory which can also be rendered as XML
run-time memory all instantiated objects and members are stored in the run-time memory which can also be rendered as XML
state file an XML file that contains the current state of a program which can be reloaded to resume the program's execution from the point where it saved its state
XML XML is a markup-language based on a tree structure in which there is a single root
Superx++ and XML Superx++ is tightly-coupled with XML which produces special benefits

Special Class
Node the Node abstract class is automatically inherited by all nodes (Superx++ objects) and by all Superx++ classes

Special Methods Inherited From The Node Abstract Class
append places a node (and its descendants) as the last node of a node
cdata returns the XML CDATA sections of a node
child returns the specified child of a node
comments returns the XML comments of a node
constructor the constructor method for a class
copy copies the values, attributes, members and descendants of a node to another node
count returns the number of children nodes contained within a node
delete deletes a node and its descendants from the tree
deletechild deletes the specified child node of a node
deletechildren deletes all the descendants of a node
deletechildrenexcept deletes all the descendants of a node except the specified child and its descendants
deleteleavechildren deletes a node and inserts its children in its place as children of its parent node
destructor the destructor method for a class
empty deletes all descendant nodes as well as the value, attributes and members of a node and declassifies the node in addition
firstsibling returns the first sibling of a node
insert places a node (and its descendants) at a specified sibling position as a child of a node
isempty returns true if the node has no descendant nodes and no value
lastsibling returns the last sibling of a node
nextsibling returns the sibling node that succeeds a node
numchildren returns the number of children nodes contained within a node
parent returns the parent of a node
path returns the tree path of a node
postcdata returns the XML CDATA sections succeeding a node
postcomments returns the XML comments succeeding a node
precdata returns the XML CDATA sections preceding a node
precomments returns the XML comments preceding a node
prepend places a node (and its descendants) as the first node of a node
prevsibling returns the sibling node that precedes a node
priorsibling returns the sibling node that precedes a node
root returns the root node of the tree in which the node exists
save saves a node to a file (serialization)
sibling returns the specified sibling of a node
siblingnumber returns the sibling number of a node relative to the other child nodes of its parent (1st child of the parent node = 0, 2nd child = 1, ... etc.)
tag returns the tag/name of a node
treestructuresame returns true if a node is evaluated to be the same as another based on various criteria
value returns the value of a node (or the descendant nodes if they exist)

Simple Datatypes
bool a boolean
date a date with or without the time portion
double a 64 bit real number
float a 32 bit real number
int a 32 bit whole number
long a 64 bit whole number
short a 16 bit whole number
string a contiguous set of characters

Statements
<arr> (<arr> statement) defines an array in program or method code
<arr> (<arr> clause) defines an array in a class
<attr> defines an XML attribute in program or method code
<break> prematurely terminates a loop
<case> contains a condition to be compared with the <item> of a <switch> statement as well as the statements to be executed if the comparison yields true
<class> defines or redefines a class
classes run-time class memory object
<cond> defines a condition to be used in loop and conditional statements
<construct> defines a set of contained objects for a class
<dbconnect> creates a database connection
<dbopen> opens a database connection
<dbclose> closes a database connection
<dbdelete> performs a prepared SQL DELETE statement on a database
<dberr> returns the database errors associated with a database connection
<dbinsert> performs a prepared SQL INSERT statement on a database
<dbproc> invokes a database stored procedure
<dbremove> deletes/removes a database connection or a recordset
<dbselect> performs a prepared SQL SELECT statement on a database
<dbstatement> performs a prepared SQL statement on a database
<dbupdate> performs a prepared SQL UPDATE statement on a database
<default> contains the default statements to be executed in a <switch> statement if none of the <case> clauses yield true
<deleteclass> deletes one or more defined classes from the run-time class memory
<do> ... <until> loops and executes code while a condition is false
<do> ... <cond> loops and executes code while a condition is true
<eval> performs calculations
<eval> performs object access and manipulation
exception exception object
<exec> executes the Superx++ statements within a file if specified or an embedded Superx++ statement
<expr> an expression to be calculated
<expr> an expression containing an object query to find a set of objects matching the query's criteria
false specifies a false boolean value
<file> reads and returns entire contents of a file
<for> loops and executes code
<func> defines a method within a class
<getclasses> renders the run-time class memory object as XML
<getexception> renders the exception object as XML
<getmem> renders the run-time memory object as XML
<getxin> renders the input stream object as XML
<getxout> returns the contents of the output stream
<getxpp> renders the program object as XML
<if> performs a conditional test and executes code
<include> performs whole, partial and conditional inclusion of Superx++ program files
<item> contains an <eval> statement which yields the object to be compared in a <switch> statement
<init> specifies the initial Superx++ statement to be executed before the first iteration of the <for> loop
<lib_open> opens a connection between the Superx++ program and an external library executable (a .dll file)
<lib_close> closes a connection between the Superx++ program and an external library executable (a .dll file)
<lib_func> invokes a public function in an opened external library executable (a .dll file)
mem run-time memory object
<msg> displays a message box to the user
<node> instantiates an object
<parm> specifies a parameter to be substituted into an expression
<parm> specifies a parameter to be passed to a method
<parm> specifies a parameter to be substituted into a SQL statement
<parm> specifies a parameter to be passed to a stored procedure in a relational database
<post> performs an HTTP POST to send a Superx++ object or XML node (along with its descendants) to a URL
<return> terminates execution of a method or program and possibly returns a value
<save> saves an XML tree or an object to a file (serialization)
<saveprogstate> saves the current state of a program being executed into an XML state file
<scope> specifies the accessibility of methods and members of a class
<step> specifies the Superx++ statement to be executed after each iteration of the <for> loop
<sql> an expression containing a SQL statement to be passed to a relational database for processing
<switch> performs a conditional test and executes code
<throw> raises/throws an exception
true specifies a true boolean value
<try> ... <exception> encapsulates a portion of code to be monitored for raised exceptions
<value> contains the comparison logic for each <case> within a <switch> statement
<value> contains the value to be assigned to multiple objects using simultaneous multiple object access
<var> (<var> statement) defines a variable in program or method code
<var> (<var> clause) defines a variable in a class
<while> loops and executes code while a condition is true
<xcall> calls another Superx++ program
xin input stream object
<xout> writes string data to the output stream
<xpp> defines a program
xpp run-time program object
<xselect> performs a relational query against XML documents or Superx++ object trees
<xservice> performs an HTTP POST to send an XML request for a Superx++ service. The request is sent to the XppExt.dll ISAPI extension on the remote web server. This statement can also be used to send courier messengers.

Special Calculation Functions
abs returns the absolute value of a number
asc returns the ASCII code for the first character of the string argument
base converts a string representation of a number from one base to another (valid bases are between 2 and 36)
ceil returns the nearest whole number greater than the numerical argument
chr returns the character represented by the ASCII code in the numerical argument
cos returns the cosine of a number
date converts a string to a date and returns the date
day returns the day of the month of the date argument
dayofweek returns the day of the week (e.g. Sunday) of the date argument
dayofyear returns the day of the year of the date argument
find returns the index of the first character of a string located within another string, or -1 if the string is not found
floor returns the nearest whole number less than the numerical argument
format returns the formatted string representation of a date or a number
hour returns the hour of the time portion of the date argument
instr returns the index of the first character of a string located within another string, or -1 if the string is not found
isnull returns true if the argument evaluates to ""
len returns the number of characters in a string
left returns a subset of the string argument from the start of the string
lower returns the lowercase version of a string
ltrim strips off the leftmost spaces before the first non-space character within a string and returns the resulting string
mid returns a subset of the string argument
minute returns the minutes of the time portion of the date argument
month returns the number representing the month (1 - 12) of the date argument
not returns the inverse value of a boolean expression: i.e. expressions yielding true are inverted to false and vice versa
now returns the current date and time
replace replaces every occurrence of string B in string A with string C and returns the resultant string A
reverse returns the reversed version of a string
right returns a subset of the string argument from the end of the string
round rounds a number to a particular number of decimal places and returns the result
rtrim strips off the rightmost spaces after the last non-space character within a string and returns the resulting string
second returns the seconds of the time portion of the date argument
sin returns the sine of a number
tan returns the tangent of a number
today returns the current date without the time portion
trunc returns the date portion of a date, ignoring the time portion
truncate returns the date portion of a date, ignoring the time portion
upper returns the uppercase version of a string
year returns the year of the date argument