Mensaje    Asunto: control de horas Responder citando

hola!

Tenia una question,

Haver si me podrias ayuder pq estoy liado en una funcion ke me dice si en un MaskEdit, la hora entrada es en punto o i media. O sea ke solo puede aceptar horas exactas(12:00,13:00 o horas i media(12:30,13:30).

Tengo esto:

bool Reserva::Partes_Correctas(AnsiString text)
{

bool resul;
int temps;

resul = false;

if ((StrToInt(text[1])) && (StrToInt(text[2])) && ( (StrToInt(text[3] = ('3'))) || (StrToInt(text[3] = ('0'))) ) && (StrToInt(text[4] = ('0'))) )
{
temps = StrToInt (text[1]) * 1000 + StrToInt (text[2]) * 100 + StrToInt (text[3]) * 10 + StrToInt (text[4]);
if ((temps >= 800) && (temps <=2200))
{
resul = true;
}
}
return resul;
}
El problema ke tengo es ke no me pasa ni una hora.
Haver si alguin me podria echar una mano.

Gracias!