Scicos_blocks src: fix EXPRESSION block
[scilab.git] / scilab / modules / scicos_blocks / src / c / evaluate_expr.c
index 4a2c858..ccde9ea 100644 (file)
@@ -491,11 +491,11 @@ SCICOS_BLOCKS_IMPEXP void evaluate_expr(scicos_block *block, int flag)
                                 stack[bottom] = (double) block->mode[nzcr];
                             }
                             break;
-                        /*  if (stack[bottom]>0) {
-                          stack[bottom]=floor(stack[bottom]+.5);
-                        }else{
-                          stack[bottom]=ceil(stack[bottom]-.5);
-                        }*/
+                            /*  if (stack[bottom]>0) {
+                              stack[bottom]=floor(stack[bottom]+.5);
+                            }else{
+                              stack[bottom]=ceil(stack[bottom]-.5);
+                            }*/
                         case 111:
                             if (block->ng > 0)
                             {
@@ -595,13 +595,13 @@ SCICOS_BLOCKS_IMPEXP void evaluate_expr(scicos_block *block, int flag)
                                 stack[bottom] = (double) block->mode[nzcr];
                             }
                             break;
-                        /* if (stack[bottom]>0) {
-                          stack[bottom]=1.0;
-                        }else if(stack[bottom]<0){
-                          stack[bottom]=-1.0;
-                        }else{
-                          stack[bottom]=0.0;
-                          }*/
+                            /* if (stack[bottom]>0) {
+                              stack[bottom]=1.0;
+                            }else if(stack[bottom]<0){
+                              stack[bottom]=-1.0;
+                            }else{
+                              stack[bottom]=0.0;
+                              }*/
                         case 114:  /* abs */
                             if (block->ng > 0)
                             {
@@ -643,11 +643,11 @@ SCICOS_BLOCKS_IMPEXP void evaluate_expr(scicos_block *block, int flag)
                                 stack[bottom] = stack[bottom] * (block->mode[nzcr]);
                             }
                             break;
-                        /* if (stack[bottom]>0) {
-                          stack[bottom]=stack[bottom];
-                        }else {
-                          stack[bottom]=-stack[bottom];
-                          }*/
+                            /* if (stack[bottom]>0) {
+                              stack[bottom]=stack[bottom];
+                            }else {
+                              stack[bottom]=-stack[bottom];
+                              }*/
                         case 115:
                             if (block->ng > 0)
                             {
@@ -737,6 +737,8 @@ SCICOS_BLOCKS_IMPEXP void evaluate_expr(scicos_block *block, int flag)
                             stack[bottom] = log10(stack[bottom]);
                             break;
                     }
+                    break;
+
                 default:
                     set_block_error(-2);
                     return;