Hi All,
I have Updated to the new Version FWH 9.08 and Harbour 2.0
During compilation i get the warning Meaningless use of expression 'Logical'
Example:
REDEFINE BTNBMP ::oBtn[14,1] ID 95 noborder;
RESOURCE "MGET1","","MGET11" OF ::oFld:aDialogs[1] ;
ACTION (IF(oSchl:Formular(oSchl:oSchlDbf), oSchl:BtnUpdate("STAMM"), .T. ),oSchl:oDlg:SetFocus()) ;
TOOLTIP "Formular-Texte" ;
MESSAGE "Formular-Texte in der ausgewählten Sprache"
::oBtn[14,2] := {|| IF(! ::oSchlDbf:lReadOnly .OR. ::oSchlDbf:sprache="DEUTSCH" , .T., .F.)}
this get the warning
ACTION (IF(oSchl:Formular(oSchl:oSchlDbf), oSchl:BtnUpdate("STAMM"), .T. ),oSchl:oDlg:SetFocus()) ;
but this works
ACTION (IF(oSchl:Formular(oSchl:oSchlDbf), oSchl:BtnUpdate("STAMM"), ),oSchl:oDlg:SetFocus()) ;
I will not change my complete sourcecode.
Have you any solution for me
Thanks in advance
camelot
Meaningless use of expression 'Logical'
Re: Meaningless use of expression 'Logical'
Hello,
I think using Your syntax :
IF(! ::oSchlDbf:lReadOnly .OR. ::oSchlDbf:sprache="DEUTSCH" , .T., .F.)
it must be :
IIF(! ::oSchlDbf:lReadOnly .OR. ::oSchlDbf:sprache="DEUTSCH" , .T., .F.)
Best Regards
Uwe
I think using Your syntax :
IF(! ::oSchlDbf:lReadOnly .OR. ::oSchlDbf:sprache="DEUTSCH" , .T., .F.)
it must be :
IIF(! ::oSchlDbf:lReadOnly .OR. ::oSchlDbf:sprache="DEUTSCH" , .T., .F.)
Best Regards
Uwe
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.
- Detlef Hoefner
- Posts: 312
- Joined: Sat Oct 08, 2005 9:12 am
- Location: Germany
- Contact:
Re: Meaningless use of expression 'Logical'
camelot,
if() or iif() is the same.
But the compiler is correct.
An action like '.t.' is meaningless, because it is no action.
You should write 'NIL' in case the second state of your if doesn't need an action.
ACTION (IF(oSchl:Formular(oSchl:oSchlDbf), oSchl:BtnUpdate("STAMM"), NIL ),oSchl:oDlg:SetFocus())
Regards,
Detlef
if() or iif() is the same.
But the compiler is correct.
An action like '.t.' is meaningless, because it is no action.
You should write 'NIL' in case the second state of your if doesn't need an action.
ACTION (IF(oSchl:Formular(oSchl:oSchlDbf), oSchl:BtnUpdate("STAMM"), NIL ),oSchl:oDlg:SetFocus())
Regards,
Detlef
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Meaningless use of expression 'Logical'
I agree with Detlef, it should either be NIL or left blank.
James
James