why can't you jump to a "x OR y"? in this case?
explain the first problem before continuing, please.Code:var I : Integer; begin I := 0; case I of 0 OR 1: MessageBox(0, '0 OR 1', 'info', 0);//why doesn't this work? else MessageBox(0, 'Will fail :)', 'info', 0); end;
I also noticed strange behavior while fucking around, can anyone explain?
Code:var I : Integer; begin I := 0 OR 1; case I of 0 OR 1: MessageBox(0, '"I := 0 OR 1;" ?)', 'info', 0); else MessageBox(0, 'Should Not Fail.', 'info', 0); end; EndCode:var I : Integer; begin I := 0; case I of 0..1: MessageBox(0, '0..1', 'info', 0); else MessageBox(0, 'Should Not Fail.', 'info', 0); end; End;Code:var I : Integer; begin I := 0 OR 1; case I of 0..1: MessageBox(0, 'I := 0 or 1; 0..1 (also works with 0, 1):', 'info', 0); else MessageBox(0, 'Should Not Fail.', 'info', 0); end;Code:var I : Integer; begin I := 0; case I of 0, 1: MessageBox(0, '0, 1 (comma wtf?)', 'info', 0); else MessageBox(0, 'Should Not Fail.', 'info', 0); end; End;


1Likes
LinkBack URL
About LinkBacks
Reply With Quote