If condition1 and condition2 do something Endifbehaves differently from
If condition1 If condition2 do soemthing Endif EndifI am pretty sre that this is a bug, but I don't expect it to be fixed. :-)
>LPARAMETERS nKeyCode, nShiftAltCtrl >if IsAlpha(Chr(nKeyCode)) && and nKeyCode=>0 && Remove the first && to see the bug > DoDefault(Asc(Upper(Chr(nKeyCode))), nShiftAltCtrl) > NoDefault >EndIf>
>LPARAMETERS nKeyCode, nShiftAltCtrl >if IsAlpha(Chr(nKeyCode)) && and nKeyCode=>0 && Remove the first && to see the bug > NoDefault > DoDefault(Asc(Upper(Chr(nKeyCode))), nShiftAltCtrl) >EndIf>
>>LPARAMETERS nKeyCode, nShiftAltCtrl >>if IsAlpha(Chr(nKeyCode)) && and nKeyCode=>0 && Remove the first && to see the bug >> DoDefault(Asc(Upper(Chr(nKeyCode)))) >> NoDefault >>EndIf>>This code runs fine EXCEPT when any of the function keys are cleared, because default function keys set negative values for nKeyCode, and cause chr(nKeyCode) to generate an error. So I added a check for nKeyCode>0, which appeared to work fine for most keys, but not all. The following keys are simply "eaten" when I check for nKeyCode>0 by adding the "and nKeyCode=>0": D,E,F,G,T,U,V and W, plus a few international characters.
>>LPARAMETERS nKeyCode, nShiftAltCtrl >>if IsAlpha(Chr(nKeyCode)) >> If nKeyCode=>0 >> DoDefault(Asc(Upper(Chr(nKeyCode)))) >> NoDefault >> EndIf >>EndIf>>