Batch – If, ElseIf, Else

@echo off title Test echo Select a language. (de/en) set /p language= IF /i “%language%”==”de” goto languageDE IF /i “%language%”==”en” goto languageEN echo Not found. goto commonexit :languageDE echo German goto commonexit :languageEN echo English goto commonexit :commonexit pause The point is that batch simply continues through instructions, line by line until it reaches a … Read more

What use does if_/3 have?

In old-fashioned Prolog code, the following pattern arises rather frequently: predicate([], …). predicate([L|Ls], …) :- condition(L), then(Ls, …). predicate([L|Ls], …) :- \+ condition(L), else(Ls, …). I am using lists here as an example where this occurs (see for example include/3, exclude/3 etc.), although the pattern of course also occurs elsewhere. The tragic is the following: … Read more