Menu

#669 SHIFT can be one array param instead list of single params

v1.0 (example)
closed-fixed
nobody
None
1
2015-10-21
2015-09-30
Alain C.
No

SHIFT(array, 1,2,3 ...) is equivalent to SHIFT(array, [1,2,3 ... ])

a1 = SHIFT(DIST(128), 12, -5) --> OK

a2=SHIFT(DIST(128), [12, -5])

% SHIFT: Parameter must be a scalar or 1 element array in this context: <Expression> <INT Array<span="">[2]>
% Execution halted at: $MAIN$

It is not a very difficult bug (around line 4665 in "basic_fun.cpp")
but it is too late today ! Sorry !!

Alain

Discussion

  • Alain C.

    Alain C. - 2015-09-30
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,11 +1,10 @@
    -
     SHIFT(array, 1,2,3 ...) is equivalent to SHIFT(array, [1,2,3 ... ]) 
    
    -a1 = SKIP(DIST(128), 12, -5)  --> OK
    +a1 = SHIFT(DIST(128), 12, -5)  --> OK
    
    -a2=SKIP(DIST(128), [12, -5])
    +a2=SHIFT(DIST(128), [12, -5])
    
     % SHIFT: Parameter must be a scalar or 1 element array in this context: <Expression> <INT       Array[2]>
     % Execution halted at: $MAIN$          
    
     
  • Alain C.

    Alain C. - 2015-10-04

    I put an attenpt for this bug. But I have some troubles with basic tests in IDL (the doc. seems to be in contradiction with the results !!)

    And who could give an exemple with SHIFT on OBJ and PTR types ?! Thanks

    Alain

     
  • Alain C.

    Alain C. - 2015-10-21
    • status: open --> closed-fixed
     
  • Alain C.

    Alain C. - 2015-10-21

    done in the CVS.

    unfortunatelly, no clean test cases added ...

    I do not understood the case with GDL_OBJ and GDL_PTR, examples welcome !!

     

Log in to post a comment.