**********   THANK YOU  *******************
I missed the dot.....  Oh boy!  I need more sleep. 
If the dot would have been a flea it would had bit me and I would have not
even known it.
Thank you again Mr. MikeB
Manuel  
LA, Calif.

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of MikeB
Sent: Sunday, June 29, 2008 8:41 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Parenthesis in conditional statements

When you show example, use the "exact" code that is failing, via Cut and
Paste.
Right now, I am wondering if you actually forgot the dotted variable to the 
right of the conditional operator or if that is actually what you are doing,
in 
which case it should fail.

For example:

SET VAR v1 TEXT = 'YES'
SET VAR v2 TEXT = 'YES'

IF v1 = v2 THEN
  PAUSE 2 USING 'equal'
ELSE
  PAUSE 2 USING 'not equal'
ENDIF
RETURN

the condition shows 'not equal' even though we know they are.

SET VAR v1 TEXT = 'YES'
SET VAR v2 TEXT = 'YES'

IF v1 = .v2 THEN
  PAUSE 2 USING 'equal'
ELSE
  PAUSE 2 USING 'not equal'
ENDIF
RETURN

the condition shows 'equal'





----- Original Message ----- 
From: "Manuel" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Sunday, June 29, 2008 10:54 AM
Subject: [RBASE-L] - Parenthesis in conditional statements


> Hello Everyone,
>
> The normal way to write the conditional statement is:
>
> IF variable1 = variable2 THEN ..................
>
> I found that sometimes this fails? And if I write:
>
> IF (variable1) = (variable2) THEN ................
>
> IT WORKS!
>
> Some of my settings are:
> SET ZERO ON
> SET EQNULL ON
> SET WHILEOPT OFF
> SET NULL -0-
> Lasted version 7.6 Windows
>
> Can anyone explain to me the use of parenthesis under this
> condition?  When we should and when should not use them?  This issue has
> plagued me for years but I am really stumped and need a little help from
the
> Gurus.
> THANK YOU,
> Manuel  -- Los Angeles, CA
>
>
> 


Reply via email to