IN operator



IN operator
Smart pascal source code
var i: Integer; for i := 1 to 10 do if i in [2, 4, 6 .. 8] then WriteLn(i); WriteLn(BoolToStr(1 in [])); if 'A' in ['A' .. 'Z'] then WriteLn('A in A..Z'); if 'a' in ['A' .. 'Z'] then WriteLn('a in A..Z'); {<<< RESULT - CONSOLE LOG >>> ----------------------------- 2 4 6 7 8 False A in A..Z ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}