Re: If/then and sequences...
- Posted by Kat <gertie at PELL.NET> Aug 28, 2000
- 464 views
On 28 Aug 2000, at 9:33, LEVIATHAN wrote: > Heya all! > > Alright, i've got a slight problem... > > I've got a sequence. An object even. its called buffer. > > I've got to compare a object against another sequence (if buffer[1] = > "//ammo" then ...) > > However, when I go and run it, it pukes like so: > > "true/false condition must be an ATOM". > > Obviously my object i'm comparing against is a sequence, and the > object i'm using is definatly not a sequence. > > So, how would I get around this? >From the Eu refman: equal Syntax: i = equal(x1, x2) Description: Compare two Euphoria objects to see if they are the same. Return 1 (true) if they are the same. Return 0 (false) if they are different. Comments: This is equivalent to the expression: compare(x1, x2) = 0 Example 1: if equal(PI, 3.14) then puts(1, "give me a better value for PI!\n") end if Kat