# BBO Discussion Forums: Syntax problem - BBO Discussion Forums

Page 1 of 1

## Syntax problem

### #1rpls

• Group: Members
• Posts: 2
• Joined: 2013-July-06

Posted 2018-October-12, 06:26

Hi
I know how to write a basic condition for generating hands.
For example:

```(( hcp(east)>=6 and hcp(east)<=10)
or(hearts(east)>=7 and hcp(east,hearts)>=5)
or(diamonds(east)>=7 and hcp(east,diamonds)>=5 )
or(clubs(east)>=7 and hcp(east,clubs)>=5 )))```

What I dont know how to do is to add to this code a condition for either south or north also having 6 cards of spades. Is that possible?

Regards

0

### #2pescetom

• Posts: 1,314
• Joined: 2014-February-18
• Gender:Male
• Location:Italy

Posted 2018-October-12, 06:41

The syntax looks quite simple, so it must be something like this:

```(( hcp(east)>=6 and hcp(east)<=10)
or(hearts(east)>=7 and hcp(east,hearts)>=5)
or(diamonds(east)>=7 and hcp(east,diamonds)>=5 )
or(clubs(east)>=7 and hcp(east,clubs)>=5 )))```

0

### #3nullve

• Posts: 1,156
• Joined: 2014-April-08
• Gender:Male
• Location:Norway
• Interests:partscores

Posted 2018-October-12, 06:55

pescetom, on 2018-October-12, 06:41, said:

The syntax looks quite simple, so it must be something like this:

```(( hcp(east)>=6 and hcp(east)<=10)
or(hearts(east)>=7 and hcp(east,hearts)>=5)
or(diamonds(east)>=7 and hcp(east,diamonds)>=5 )
or(clubs(east)>=7 and hcp(east,clubs)>=5 )))```

The "equals" symbol is '==', not '=', so make it
```(( hcp(east)>=6 and hcp(east)<=10)
or(hearts(east)>=7 and hcp(east,hearts)>=5)
or(diamonds(east)>=7 and hcp(east,diamonds)>=5 )
or(clubs(east)>=7 and hcp(east,clubs)>=5 )))```
.
0

### #4rpls

• Group: Members
• Posts: 2
• Joined: 2013-July-06

Posted 2018-October-12, 07:17

nullve, on 2018-October-12, 06:55, said:

The "equals" symbol is '==', not '=', so make it
```(( hcp(east)>=6 and hcp(east)<=10)
or(hearts(east)>=7 and hcp(east,hearts)>=5)
or(diamonds(east)>=7 and hcp(east,diamonds)>=5 )
or(clubs(east)>=7 and hcp(east,clubs)>=5 )))```
.

I just tried the last code and it worked perfectly

I wanna thank both of you for your help

Regards
0