1. Re: Win32Lib --Duh

>Hawke, dont take this the wrong way, but it can be a little ( a really tiny
>little ) more elegant. (no offense)
none taken :)

>It doesnt work for all objects: find () does not look into every sequence.
>Unfortunately (hey, Robert.. Suggestion), simerlar to find, there is no
>'search' that does go into every object (but first examines wether or not
>the sequence, when we are searching for a sequence matches). Here is
>search:(it returns a sequence of indexes or -1 when nothing is found)
argh! yer right... good eyes! :)

>    function search (object i, object z)
>    object result
>        if equal (i, z) then
>            return {}
>        elsif sequence (z) then
>            for index = 1 to length(z) do
>                result = search (i, z[index])
>                if sequence (result) then
>                    return index & result
>            end for
>        else
>            return -1
>        end if
>    end function
handy function, might just slap this puppy into the ole toolbox
when (if?) I ever get _my_ computer setup again...
(I'm borrowing a computer to try to keep up with email a little...)


--Hawke'

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu