1. oops, wrong key

to used to using tab in code

sequence data = "#test"
sequence testchar = "#"

if equal(data[1], testchar)
          do this
else 
          do that
endif

problem is equal never comes out true, what am I doing wrong ?

also, does anyone have an ansi to rtf conversion routine in eu?

thanks all

Dave

new topic     » topic index » view message » categorize

2. Re: oops, wrong key

The problem is that the value of data[1] is not a sequence, it is an atom.
Another words, '#' is not equal "#".

I think it will work if you change one line to:
sequence testchar =3D '#'

And if you do that, you won't need to use the equal() function, you can=
 just use:
if data[1] =3D testchar then
...

Louis.

*********** REPLY SEPARATOR  ***********

On 10/4/2003 at 1:42 AM David Davis wrote:

>
>
>to used to using tab in code
>
>sequence data =3D "#test"
>sequence testchar =3D "#"
>
>if equal(data[1], testchar)
>          do this
>else 
>          do that
>endif
>
>problem is equal never comes out true, what am I doing wrong ?

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu