Smart pascal source code
var
aInt : array of Integer;
aFloat : array of Float;
aStr : array of String;
begin
for var i:=1 to 19 do
begin
var k:=i xor 13;
aInt.Add(k);
aFloat.Add(k-1.5);
aStr.Add('z'+k.ToString);
end;
aInt.Sort;
for var e in aInt do
WriteLn(e.ToString+','); // 0,1,2,3,4,5,6,7,8,9,10,11,12,14,15,28,29,30,31,
WriteLn('');
aFloat.Sort;
for var e in aFloat do
WriteLn(e.ToString+','); // -1.5,-0.5,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,12.5,13.5,26.5,27.5,28.5,29.5,
WriteLn('');
aStr.Sort;
WriteLn(aStr.Join(',')); // z0,z1,z10,z11,z12,z14,z15,z2,z28,z29,z3,z30,z31,z4,z5,z6,z7,z8,z9
function FloatToStr$_Float_(i) { return i.toString() }
function FloatToStr$_Float_Integer_(i,p) { return (p==99)?i.toString():i.toFixed(p) }
function $New(c) { var i={ClassType:c}; c.$Init(i); return i }
function $CmpNum(a,b) { return a-b }
var aInt = [],
aFloat = [],
aStr = [],
i = 0;
var k = 0,
a$1 = 0;
var e = 0,
a$2 = 0;
var e$1 = 0;
for(i=1;i<=19;i++) {
k = i^13;
aInt.push(k);
aFloat.push(k-1.5);
aStr.push("z"+k.toString());
}
aInt.sort($CmpNum);
var $temp1;
for(a$1=0,$temp1=aInt.length;a$1<$temp1;a$1++) {
e = aInt[a$1];
WriteLn((e.toString()+","));
}
WriteLn("");
aFloat.sort($CmpNum);
var $temp2;
for(a$2=0,$temp2=aFloat.length;a$2<$temp2;a$2++) {
e$1 = aFloat[a$2];
WriteLn((FloatToStr$_Float_(e$1)+","));
}
WriteLn("");
aStr.sort();
WriteLn((aStr).join(","));