summaryrefslogtreecommitdiff
path: root/details.js
diff options
context:
space:
mode:
Diffstat (limited to 'details.js')
-rw-r--r--details.js23
1 files changed, 11 insertions, 12 deletions
diff --git a/details.js b/details.js
index 57a5f44..9e3d0ed 100644
--- a/details.js
+++ b/details.js
@@ -549,31 +549,30 @@ function BasicBlock() {
}
function sci2exp(c) {
- if(c.scilabClass == "ScilabList") {
+ if (c.scilabClass == "ScilabList") {
c = Object.create(c);
c.scilabClass = "";
- if(c.length) {
+ if (c.length) {
return "list(" + sci2exp(c) + ")";
- }
- else {
+ } else {
return "list()";
}
- }
- else if(typeof c.length === "undefined") {
+ } else if (typeof c.length === "undefined") {
return c.toString();
- }
- else if (c.length == 0) {
+ } else if (c.length == 0) {
return "[]";
- }
- else if (c.length == 1)
+ } else if (c.length == 1)
return c.toString();
else {
var result = "[";
for (var i = 0; i < c.length; i++) {
if (typeof c[i].length === 'undefined') {
- result += c[i] + ",";
+ result += _check(c[i]) + ",";
} else {
- result += c[i][0] + ";";
+ for (var j = 0; j < c[i].length - 1; j++) {
+ result += _check(c[i][j]) + ",";
+ }
+ result += _check(c[i][c[i].length - 1]) + ";";
}
}
result = result.substring(0, result.length - 1);