タイプtposrange = 0..32; tstateresult = 0..1;関数getBitsate(Source:Integer; pos:tposrange):tstateresult;始めるresult:=((source and(1 shl pos))shr pos);終わり;