Valid command form?

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

is command valid/supported: "if equal(s[1],"r")=0 then ..."? Its the ONLY
way i can get the evaluation performed.  Any help would be greatly
appreciated.  thanks
===============================================================
object w
sequence s   --s can be variable length (1 to 3 bytes)
s="r" puts(1,s) puts(1,"    :  ")
if equal(s,"r") then puts(1,"1EQ ") else puts(1,"1NQ ") end if
puts(1,"\n")         ¦
s="r" puts(1,s) puts(1,"    :  ")
if equal(s[1],"r") then puts(1,"2EQ ") else puts(1,"2NQ ") end if
if compare(s[1],"r")=0 then puts(1,"2EQ ") else puts(1,"2NQ ") end if
if equal(s[1],"r")=0 then puts(1,"2EQ ") else puts(1,"2NQ ") end if
puts1,"\n")
s="r1g" puts(1,s) puts(1,"  :  ")
if equal(s[1],"r") then puts(1,"3EQ ") else puts(1,"3NQ ") end if   if
compare(s[1],"r")=0 then puts(1,"3EQ ") else puts(1,"3NQ ") end if
if equal(s[1],"r")=0 then puts(1,"3EQ ") else puts(1,"3NQ ") end if
puts(1,"\n")
s="r1g" puts(1,s) puts(1,"  :  ")
if length(s)>1 then ws=s[1] else ws=s end if
if equal(ws,"r") then puts(1,"4EQ ") else puts(1,"4NQ ") end if
if compare(ws,"r")=0 then puts(1,"4EQ ") else puts(1,"4NQ ") end if  if
equal(ws,"r")=0 then puts(1,"4EQ ") else puts(1,"4NQ ") end if
====================================================================
RESULTS=
r    :  1EQ                                                           r    :
  2NQ 2NQ 2EQ
r1g  :  3NQ 3NQ 3EQ
r1g  :  4NQ 4NQ 4EQ

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu