find or equal test problem

new topic     » topic index » view thread      » older message » newer message

Hi,
I can't figure what the pproblem is in this program. I try to find the 
letter "p"  in the sequence pp. I see that the value is 112 for p .
I have used the find and equal command before but  i don't know what i'm 
not doing

---======================================

include Win32lib.ew
without warning
with trace

--------------------------------------------------------------------------------
--  Window win
constant win = createEx( Window, "Autosize Demo 1", 0, Default, Default, 
403, 337, 0, 0 )
constant Button_BR = createEx( PushButton, "Bottom Right", win, 296, 
272, 88, 24, 0, 0 )

sequence buffer
object line
integer fn, pout, location
atom color, i                 -- the current color
procedure process()
atom p
sequence pp
pp= {"pickel"}

buffer = {}
    location = find("p", pp)
    if equal(pp,"p") then
        p = pp
        end if
    i = sequence(buffer)
    trace(1)
    if equal(location, 1) then
        trace(1)
        line = pp
        else
            trace(1)
    line = "    "& pp
    end if
end procedure
-- run the main
trace(1)
process()
WinMain( win,Normal )

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu