--- In [email protected], sgp <acs322...@...> wrote:
>
> powerpro version 4.9m2
 
[...]
 
> Clearly 286 is wrong, it should be 1286. Relevant code:
> 
> local s=nh.gettext
> win.debug(length(s))
> win.debug(length(s.slice(0,s.length-5)))
> win.debug(length(s.select(s.length-4))) ;; bug?
> 
> I think select() is deprecated, because the help file doesn't
> document it anymore.
 
Select is documented at the end of "String Functions and Operators" (as a 
1-based version of slice).

[...]

> 
> (2 MIME attachments included)

Attachments are not available.

There does seem to be a problem with the 2-argument version of Select, when the 
second argument exceeds 999:

local s=repeat("s", 2000)
win.debug("length s", length(s))
win.debug("length(slice(s,0,999)):", length(slice(s,0,999)))
win.debug("length(select(s,1,1000)):",length(select(s,1,1000)))
win.debug("length(slice(s,1000)):", length(slice(s,1000)))
win.debug("length(select(s,1000)):", ;;+
length(select(s,1000)),"***bug***")
win.debug("length(slice(s,999)):", length(slice(s,999)))
win.debug("length(select(s,999)):", length(select(s,999)))

Regards,
Sheri

Reply via email to