xpp {
/*
A sample program
written by Kimmie using shortx.
*/
string sRet;
int i;
for (i = 0; i < 10; i = i + 1) {
/* invoke a Superx++ service method */
sRet = sRet + xservice("text") Calculator.Mult(Parm1
= i, Parm2 = 20) + ", ";
}
sRet
= Left(sRet, Len(sRet) -
2);
sRet
= sRet + "\r\n";
for (i = 10; i > 0; i = i - 1) {
/* invoke a Superx++ service method */
sRet = sRet + xservice("text") Calculator.Mult(Parm1
= i, Parm2 = 20) + ", ";
}
sRet
= Left(sRet, Len(sRet) -
2);
xout(sRet);
node Mundu {
<age/>
<sex>Male</sex>
};
/* invoke a Superx++ service method and assign
the result to the age object */
$Mundu/age = xservice("text")
Calculator.Mult(Parm1 = 5, Parm2 = 5);
xout("\r\nMundu is " + $Mundu/age + " years old.");
}