I have found the appropriate section in the command reference under 'genr'
The available Boolean operators are (again, in order of precedence): ! (negation),
&& (logical AND), || (logical OR), >, <, =, >= (greater than or equal),
<= (less than or equal) and != (not equal). The Boolean operators can be used in
constructing dummy variables: for instance (x > 10) returns 1 if x > 10, 0
Sorry to bother you.
Von: Plus.line MailSystem [mailto:firstname.lastname@example.org] Im Auftrag von Jan Tille
Gesendet: Freitag, 9. September 2016 08:45
An: Gretl list <gretl-users(a)lists.wfu.edu>
Betreff: [Gretl-users] Boolean and / or in if-condtion (for example)
Dear list members,
I know my post is a consequence of my very modest programming skills, however, I think,
others users might encounter this problem as well.
I was trying to set up an if-command:
if [condtion 1] = True and [condition 2] = True than
In the first place, I used 'and' literally - I have to admit, that my first
experience with if-conditions are from Excel-VBA.
This of course produced an error-message.
It took me while to figure out the solution. I remembered an R-tutorial which dealt with
Boolean operators when I read the following post:
And most likely, my fault was to use the wrong operator 'and' instead of
Maybe I have missed it in the user guide, but it might be helpful, to put in a table that
deals with logical operators
&&, !, ||,etc. like
true && true is true
!true && false is true
Maybe this is clear to anyone else, than you can of course disregard my post.