I have numerous (hundreds) of Warning W0027 Meaningless use of expression "logical"...as well as others that I have not dug into yet (and I'm not eager to get into the run-time errors after a successful compile!) All of my code has been stable using the previous FWH/Harbour dated around 2006.
Here are two code blocks that I get this message regarding:
- Code: Select all Expand view RUN
- REDEFINE BUTTON oBtn4 ID 1007 OF oDlg WHEN lEdit ACTION; //save
IIF ( lNew, oPaperDbf:append(), .t.), ;
IIF( (aSave[1] .or. aSave[2] .or. aSave[3] .or. aSave[4] .or. aSave[5] ), ;
papsave(oPaperDbf, oSizeDbf, aSave), .t.) , ;
oPaperDbf:Save(), lEdit := .F., ;
IIF(lNew, papersize(oPaperDbf, oSizeDbf),.T.),;
PostMessage(oLbx1:hWnd, WM_SETFOCUS), lNew := .F., oDlg:update()
- Code: Select all Expand view RUN
- REDEFINE BUTTON oBtn4 ID 1002 OF oDlg WHEN lEdit ACTION ;
IIF ( lEdit, oSizeDbf:append(), .t.), ;
oSizeDbf:StkSize := STR(oSizeDbf:hsize,6,3)+ " X " +STR(oSizeDbf:vsize,6,3), ;
oSizeDbf:Save(), lEdit := .F., PostMessage(oLbx1:hWnd, WM_SETFOCUS), oDlg:update()
What I have discerned so far, is that almost all of the Warning errors are BUTTON commands that have more than one IIF statement or include a Postmessage statement.