Changeset 480 for trunk/thune/eval.c

Show
Ignore:
Timestamp:
09/24/07 23:27:09 (14 months ago)
Author:
krobillard
Message:

Line comments now set SOL for next value.
Select! now supports a negative index.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/eval.c

    r471 r480  
    170170                goto set_none; 
    171171        } 
     172        ur_throwErr( UR_ERR_SCRIPT, "Invalid select!" ); 
     173        return 0; 
    172174    } 
    173175    else 
    174176    { 
    175         if( ur_pick( ut, val, ur_sel(sel) - 1, res ) ) 
    176             return 1; 
    177     } 
    178  
    179     ur_throwErr( UR_ERR_SCRIPT, "Invalid select!" ); 
    180     return 0; 
     177        int n = ur_sel(sel); 
     178        if( n ) 
     179        { 
     180            if( n > 0 ) 
     181                --n; 
     182            if( ur_pick( ut, val, n, res ) ) 
     183                return 1; 
     184        } 
     185    } 
    181186 
    182187set_none: