Jump to content
brad992

Using the OR command(desperate for help) (not complicated question)

Recommended Posts

Okay, so here is my problem.. Basically i want this.. (this isn't out of the script but this is the basic problem)

 

var
mp,x,y:integer;

begin
x:=1
y:=1
mp:= 5

if(x=1)
and(y=1)
and(mp=5 or 6 or 8)
then
begin
writeln('worked')
end;
end.

 

so, i want it that if 'mp' equals either 5, 6 or 8 that it will continue on(but aswell as x=1 and y=1). I thought that simply doing that(mp=5 or 6 or 8) would work but it doesn't. If i add a new line as or(mp=6) then it will ignore x and y and i don't want that.

 

 

Can anyone help me? please, it seems like an extremely easy fix that i'm somehow not getting.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...