질문 하나 할께요..
만일 조건식이 여러개일때 어떻게 간단히 할수 있어요?
예를 들면
if (a = 'aaa') or (a = 'bbb') or (a = 'ccc') or (a ='ddd') then
any_procedure()
else
another_procedure();
위와 같은 문장을 혹시 다음과 같이 하는 방법이 없나요?
if a = ('aaa' or 'bbb' or 'ccc' or 'ddd') then
any_procedure()
else
another_procedure();
반복적인 a 를 계속 쓸려니 무식한 것 같아서요....
도움 부탁 드립니다.
안된다는 것을 안다는 것이 중요하겠네요.
그럼
이것도 몰라요.. wrote:
> 질문 하나 할께요..
>
> 만일 조건식이 여러개일때 어떻게 간단히 할수 있어요?
>
> 예를 들면
>
> if (a = 'aaa') or (a = 'bbb') or (a = 'ccc') or (a ='ddd') then
> any_procedure()
> else
> another_procedure();
>
> 위와 같은 문장을 혹시 다음과 같이 하는 방법이 없나요?
> if a = ('aaa' or 'bbb' or 'ccc' or 'ddd') then
> any_procedure()
> else
> another_procedure();
>
> 반복적인 a 를 계속 쓸려니 무식한 것 같아서요....
> 도움 부탁 드립니다.
>