--- In [EMAIL PROTECTED], "swzoh" <[EMAIL PROTECTED]> wrote:
> 
> --- In [EMAIL PROTECTED], "brucexs" <[EMAIL PROTECTED]> wrote:
> > It produces an error for v[2] as I intended.  I recommend you 
set 
> > elements of arrays before you reference the, but PowerPro will 
> > return "" for unassigned elements with index less than the 
highest 
> > one assigned.
> 
> It seems that there arose some confusion around here.
> "" is not just the returned value, seems actually the assigned 
value,
> at least to vec.sort().
> 
> local v=vec.create(10)
> v[9]=0
> for(j=1;j<6;j=j+1)
> v[j]=j
> endfor


Yes, same principle applies.  If you have undefined elements less 
that the lenght of the array, and you sort the array, they will be 
treated as "", so as not to break the sort exchanges etc.

 If you use arrays with unassigned values, you are just asking for 
trouble, IMHO.









------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~-> 

Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to