Hi,
I am working through programs trying to get a project working in Oshonsoft. Some of the lines I am copying in C have digital and logic ANDs ORs and NOTs
e,g, if ((a & b) AND (NOT(a & c)))
Can someone give me an idea of how it may look in Oshonsoft please? Can Oshonsoft do this, or do each group need to be worked out first without brackets?
I'll try to some different ways and see if I can get anything to simulate.
E.
Clip from manual.
Logical Operators.
For Bit data type variables seven logical operations are available. It is possible to make only one logical operation in one single statement.
Logical operations are also available for Byte and Word variables.
For example:
DIM A AS BIT
DIM B AS BIT
DIM X AS BIT
X = NOT A
X = A AND B
X = A OR B
X = A XOR B
X = A NAND B
X = A NOR B
X = A NXOR B
DIM A AS WORD
DIM B AS WORD
A = A OR B
PORTB = PORTC AND %11110000
E.
Clip from manual.
Logical Operators.
For Bit data type variables seven logical operations are available. It is possible to make only one logical operation in one single statement.
Logical operations are also available for Byte and Word variables.
For example:
DIM A AS BIT
DIM B AS BIT
DIM X AS BIT
X = NOT A
X = A AND B
X = A OR B
X = A XOR B
X = A NAND B
X = A NOR B
X = A NXOR B
DIM A AS WORD
DIM B AS WORD
A = A OR B
PORTB = PORTC AND %11110000
morning C.
The '&' symbol is just an alternate way of writing 'AND'.
OSH uses 'AND' and will not accept '&'
Likewise
the '|' symbol is used as 'OR' in some compilers, use only 'OR' in OSH
Post the just the section of the pre-converted code, showing the expected conditions, not the whole program.
From that I should be able to see what is the action of the Statements.
morning C.
The '&' symbol is just an alternate way of writing 'AND'.
OSH uses 'AND' and will not accept '&'
Likewise
the '|' symbol is used as 'OR' in some compilers, use only 'OR' in OSH
Post the just the section of the pre-converted code, showing the expected conditions, not the whole program.
From that I should be able to see what is the action of the Statements.
Hi,
This reminds me of the use of English example: What are the most times AND can be used consecutively in one sentence?
A sign-writer is painting a pub sign 'Pig and whistle' but he has placed the words too close together. The landlord came out and said "Put a bigger space between Pig and and and and and whistle".
C.
Hi,
I have lines like;
blah (apple OR banana OR orange OR peach)
and similarly:
blah (apple AND banana AND orange AND peach)
When using the suggestions does it matter if they are 'done' in different orders? In other words, if I first (apple OR banana) then (orange OR peach) then (res1 OR res2) or 'say' OR each fruit as I go along? Similarly for AND.
C.