## Lone | Wolf

hello, I'm new to the language and so far as I can tell this should work but it isnt. Sorry its probably just a newb mistake but i've spent hours on this silly error (and used search).

``````var
call_start, call_length : integer;
discount, cost: real;

const
normal_price = 40;
VAT = 0.175;

begin
repeat                                       //repeat 1
writeln ('please input call start time in hours');
until (call_start >= 0) or (call_start <24);
repeat                                  //repeat 2
until call_length > 0;                  //repeat 2 end
discount := 1;
if (call_start > 18) then discount := 0.5
else if (call_start > 13) then discount := 0.8;
cost := call_length * normal_price * discount * VAT;
if call_length > 60 then cost := cost * 0.8;
writeln ('the price for your call was', cost);
repeat                                   //repeat 3
writeln ('do you wish to continue (Y/N)');
{it wants the end here for some reason but that excludes loop}
until (answer = 'N');                       //repeat 1 end
end.

[Error] Project2.dpr(30): 'END' expected but 'UNTIL' found``````

## LizR 171

if you look at:

``````until (call_start >= 0) or (call_start <24);
repeat                                  //repeat 2
until call_length > 0;``````

You have an until without a repeat. Hence you get a confused bit.

## Lone | Wolf

Ah thank you for the help. Can't believe I never noticed that.

No worries.

## Lone | Wolf

A quick one of question. How do i mark this thread as solved?

## LizR 171

Dunno I never asked a question here, I assume theres a button to say "resolved" somewhere.