(* ::Package:: *)

ilast=10;tidum={};
For[idum=1,idum<= ilast,idum++,
If[idum!=5,tidum=Append[tidum,idum]];
];(*end for idum*)
Print[tidum]

