Results 1 to 7 of 7
-
10-21-2008, 04:42 AM #1
- Join Date
- Aug 2008
- Location
- oslo, norway
- Posts
- 62
sioc programming question: IF..AND..
Hello!
If I want to say "if a>0 AND b=5, then c=0",
can I write
Var 2000
(
IF a>0
b=5
(
c=0
)
)
or do I have to use the "AND" word?
I receive errors when trying to say " IF a>0 AND b=5 "
-
10-21-2008, 05:42 AM #2
- Join Date
- Aug 2008
- Location
- oslo, norway
- Posts
- 62
... or,
what to write if I want to say
IF a>5 OR a<-5
..
-
10-21-2008, 05:51 AM #3
- Join Date
- Aug 2008
- Location
- Istanbul
- Posts
- 88
Hi,
As fas as I remeber you have to write a new condition using ELSE IF. Try using the own program within SIOC to wirte instead of trying on the .txt format. You can find all functions in a very good GUI there.
Best Regards,
barkay
-
10-21-2008, 06:06 AM #4
- Join Date
- Jun 2008
- Location
- Jersey Channel Islands
- Posts
- 28
SIOC Code
Hi
Try this...
Var 1 name a
Var 2 name b
var 3 name c
{
C0 = &a > 0
C1 = &b = 5
IF C0 AND C1
{
&c = 0
}
}
-
10-21-2008, 06:39 AM #5
- Join Date
- Aug 2008
- Location
- oslo, norway
- Posts
- 62
thank you som much, pro's!
I see; the AND and OR is to be used only with the C's,
true or not trues.
I will certainly try that!
-
10-21-2008, 06:57 AM #6
- Join Date
- Jun 2008
- Location
- Jersey Channel Islands
- Posts
- 28
SIOC Code
Hi
This is a better way of writting it the other way was to show the use of Internal Variables.
Var 1 name a
Var 2 name b
var 3 name c
{
IF &a > 0
{
IF &b = 5
{
&c = 0
}
}
}
-
10-21-2008, 02:14 PM #7
http://www.lekseecon.nl/howto.html#internalVars
cheers,
Nico
Similar Threads
-
Where to find real beginners-info for SIOC programming, preferred in dutch, otherwise in english
By bstikkel in forum OpenCockpits General DiscussionReplies: 5Last Post: 09-22-2010, 11:02 AM -
Sioc Question
By Olympic260 in forum OpenCockpits General DiscussionReplies: 6Last Post: 02-01-2010, 08:50 PM -
Question on SIOC
By 4EVERCooL in forum OpenCockpits General DiscussionReplies: 5Last Post: 10-14-2008, 12:07 AM -
A BIG thanks & another SIOC question
By jmig in forum OpenCockpits General DiscussionReplies: 1Last Post: 09-02-2008, 12:25 PM