Re: conditional expressions and more

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

> yea okay basically i'm wondering if there's some way to use sequences
> in conditional expressions while avoid that oh-so-annoying
> conditional expression must be an atom error...  if you don't know
> what i'm talking about, i want to do something like this:

I'm new here, but I'm pretty sure that the answer is to use the compare()
function.  Using your example:

> sequence a,b
>
> a = "fred"
> b = "bob"
>
> if a = b then

change that line to be:

 if compare(a, b) = 0 then
>     puts(1,"they are the same\n")
> else
>     puts(1,"they are not the same\n")
> end if
>
> abort(1)
>

I tested it, and it seems to work...

 __
    Snowgen
     snowgen at wf.net
     http://www.wf.net/~snowgen/

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

Search



Quick Links

User menu

Not signed in.

Misc Menu