|
![](/i/fill.gif) |
Position 1 might be a good way of saying first character of a string though,
since it isn't a completely numerical thing being dealt with.
substr("abcd",1,1) being "a", instead of substr("abcd",0,0), just looks more
correct in this context to me.
Why isn't there a strlen() in the documentation? :-)
Bob H.
"Warp" <war### [at] tag povray org> wrote in message
news:3a94e885@news.povray.org...
> It seems that the one who wrote that part of the doc thought that the
> indexing starts from 0 and ends at strlen(S)-1, as in C.
>
> Perhaps the problem is not in the documentation, but in povray. In my
> opinion this behaviour is a bit inconsistent. Array indexing starts from
0.
>
> --
> char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
> main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
> c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |