if(...).... in ohne line

Propose new features and changes
User avatar
Posts: 269
Joined: 12 May 2015, 02:10
GitHub: sl5net

if(...).... in ohne line

16 Jul 2017, 10:43

I was surprised when I accidentally discovered this very strange behavior. On an unware statement nevertheless commandos. Later I realized that it was probably because it was all in one line. Other programming languages are no problem. An error message has it also nciht. I will now have to examine my other scripts.

the following lines works like a true condition:


follwong works like false (like expected):


with regex you could find it with:
^[ ]*if[ ]*\([^()]+\)[^{\s]+

Posts: 213
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: if(...).... in ohne line

17 Jul 2017, 00:57

The IfEqual, IfNotEqual, etc commands can have another command on the same line - see the help documentation for details.
My programs:-
ReClip - a Text Reformatting and Clip Management utility
XRef - Produces Cross Reference lists for scripts

Posts: 5939
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: if(...).... in ohne line

17 Jul 2017, 02:34

(false) lll is a legitimate expression which concatenates the variables false (containing 0) and lll.

The condition of an IF statement is not required to be enclosed in parentheses. It is just a convenient way of disambiguating between IF-expression and the other types of IF statement, since expressions always allow parentheses and the other types of IF do not.

On an unware statement nevertheless commandos.


What? I'm guessing that was mistranslated.

Return to “Wish List”

Who is online

Users browsing this forum: No registered users and 2 guests