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

do stuff

endif

 

 

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:

 

http://lists.wfu.edu/pipermail/gretl-devel/2007-December/000714.html

 

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.

 

Best regards

 

Jan