Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

演算子 OR 、ANDの優先順位(検討事項) #40

Open
Tamakichi opened this issue Sep 10, 2018 · 0 comments
Open

演算子 OR 、ANDの優先順位(検討事項) #40

Tamakichi opened this issue Sep 10, 2018 · 0 comments
Assignees
Labels
question Further information is requested

Comments

@Tamakichi
Copy link
Owner

演算子 OR 、ANDの優先順位
下記のIF文の条件式において、

10 INPUT "age=",N
20 IF N<0 OR N>120  ?"bad value":GOTO 10
30 ?"age:";N

仕様では、ORと<>が同じ優先順位のため、

10 INPUT "age=",N
20 IF (N<0) OR (N>120)  ?"bad value":GOTO 10
30 ?"age:";N

と記述する必要がある。
論理演算子は
=, <> , != , >, >= , < , <=
よりも低い優先順位にする必要があるのではないか?

@Tamakichi Tamakichi added the question Further information is requested label Sep 10, 2018
@Tamakichi Tamakichi self-assigned this Sep 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant