Logical Operator Problem 
Author Message
 Logical Operator Problem

Hi

I can't get the logical operator to work logically.
Can anyone help?

gotoxy(15,9);
write('Serviceman_Age      : ');
Readln (result[counter].Serviceman_Age);
if (serviceman_age >=16) and (serviceman_age <25) then
begin
    gotoxy(15,10);
    writeln('age group is Cat X');
end
    else
        begin
            gotoxy(15,10);
            writeln('age group is Cat Y');
        end;
gotoxy(15,12);
writeln('Enter IPPT Results');

If I use the statement in line 3,
any age that I enter will still be under cat X
but if i replace line 3 with readln(serviceman_age);
it works just fine.
So where did I go wrong?

Regards

Poh San



Wed, 18 Jun 1902 08:00:00 GMT  
 Logical Operator Problem
I would like to see what is before... declarations..

Hi

I can't get the logical operator to work logically.
Can anyone help?

gotoxy(15,9);
write('Serviceman_Age      : ');
Readln (result[counter].Serviceman_Age);
if (serviceman_age >=16) and (serviceman_age <25) then
begin
    gotoxy(15,10);
    writeln('age group is Cat X');
end
    else
        begin
            gotoxy(15,10);
            writeln('age group is Cat Y');
        end;
gotoxy(15,12);
writeln('Enter IPPT Results');

If I use the statement in line 3,
any age that I enter will still be under cat X
but if i replace line 3 with readln(serviceman_age);
it works just fine.
So where did I go wrong?

Regards

Poh San



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Logical Operator Problem

2. logical operators in pascal, help!

3. TQuery calculated field and logical operator

4. Local SQL, problem with OR operator in WHERE clause

5. Problem using LIKE operator with DBASE files in Delphi

6. Accessing logical fields in paradox tables via ODBC

7. Delphi2-Logical Field True<=>Yes,False<=>No Display

8. Tip: Indexing & Searching With dBASE Logical Fields

9. Creating an logical combination brute-forcing routine ??

10. logical and

11. Reset logical connection NW4.1

12. calculating logical fields with sql?

 

 
Powered by phpBB® Forum Software