multi criteria IF statement
|
06-11-2021, 11:06 AM
Post: #1
|
|||
|
|||
multi criteria IF statement
Hello,
I'm trying to write a program for directional angle calculation. But my issue are the IF statements. I have to test two variables in 4 different scenarios. example Local y,x,n; IF ( y>0 and x>0) then n:=ATAN( y/x); /// 1' scenario if the y or x is not greater next test IF( y>0 and x<0) then n:=ATAN (y/x)+180; //// 2' scenario IF( y<0 and x<0) then n:=ATAN(y/x)+180; //// 3' scenario IF ( y<0 and x>0) then n:=ATAN(y/x)+360; ///// 4' And i'm not sure how to write it. Code: IF ( y>0) THEN I have tried like that, but i't doesnt give the correct awnser. And also at end of program i have to write END; like 6 times or so. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
multi criteria IF statement - Amer7 - 06-11-2021 11:06 AM
RE: multi criteria IF statement - roadrunner - 06-11-2021, 11:37 AM
RE: multi criteria IF statement - Amer7 - 06-11-2021, 11:59 AM
RE: multi criteria IF statement - toml_12953 - 06-11-2021, 02:04 PM
RE: multi criteria IF statement - Liamtoh Resu - 06-11-2021, 10:09 PM
RE: multi criteria IF statement - Dougggg - 06-12-2021, 03:05 AM
RE: multi criteria IF statement - Albert Chan - 06-12-2021, 11:53 AM
RE: multi criteria IF statement - toml_12953 - 06-13-2021, 05:35 AM
RE: multi criteria IF statement - Joe Horn - 06-13-2021, 01:10 PM
RE: multi criteria IF statement - toml_12953 - 06-13-2021, 03:19 PM
RE: multi criteria IF statement - David Hayden - 06-12-2021, 02:28 PM
RE: multi criteria IF statement - Liamtoh Resu - 06-16-2021, 02:58 AM
|
User(s) browsing this thread: 1 Guest(s)