Difference between revisions of "User talk:UNKNOWNPLAY4"

From Lazarus wiki
Jump to navigationJump to search
(HELP!!!)
 
Line 17: Line 17:
  
 
UNKNOWNPLAY4
 
UNKNOWNPLAY4
 +
 +
You should ask on the forum or mailinglist.
 +
The wiki is meant for this.
 +
 +
A quick answer:
 +
 +
<syntaxhighlight>
 +
begin
 +
  REPEAT
 +
    writeln ('question');
 +
    readln (Q1);
 +
  UNTIL (Q1 = 'answer1') or (Q1 = 'answer2') or (Q1 = 'answer3');
 +
end.
 +
</syntaxhighlight>
 +
 +
Bart

Revision as of 15:02, 23 October 2012

HELP!!!

hi

is there a way to have multiple expressions after an UNTIL, eg

begin

REPEAT
  writeln ('question');
  readln (Q1);
UNTIL 'answer1', 'answer2', 'answer3' 

end.

the commas dont work neither does OR and i dont want to use IF.

any comments welcome.

UNKNOWNPLAY4

You should ask on the forum or mailinglist. The wiki is meant for this.

A quick answer:

begin
  REPEAT
    writeln ('question');
    readln (Q1);
  UNTIL (Q1 = 'answer1') or (Q1 = 'answer2') or (Q1 = 'answer3'); 
end.

Bart