Simple programming question.
Simple programming question.
(OP)
I have been looking all over the net and have been unable to accomplish something that would take 10 seconds in any programming language...HELP PLEASE
simply, I need to run multiple commands if a value is true or false.
Exampl
if H < 5
x=2
y=9
gg=567
h.3=h.9
If H > 5
x=42
y=93
gg=23567
h.3=h.7
I have seen the commen if function (Condition,TV,FV)
but have not been able to find a away to accomplish what I need to do without writing a if statement for every line.
I have so many lines that are based on conditions that it will be really really sloppy if I have to write a (if) for each line.
Can in any way I run a block of code using a if statement.
I have been looking all over the web and couldnt find an example/answer.
Thanks
simply, I need to run multiple commands if a value is true or false.
Exampl
if H < 5
x=2
y=9
gg=567
h.3=h.9
If H > 5
x=42
y=93
gg=23567
h.3=h.7
I have seen the commen if function (Condition,TV,FV)
but have not been able to find a away to accomplish what I need to do without writing a if statement for every line.
I have so many lines that are based on conditions that it will be really really sloppy if I have to write a (if) for each line.
Can in any way I run a block of code using a if statement.
I have been looking all over the web and couldnt find an example/answer.
Thanks
RE: Simple programming question.
z:2,9,567,h.9 (using ALt m)
z2: same idea
z:if(H>5,z1,z2)
x:z[0
y:z[1
gg:z[2
h.3:z[3
is an easy way to only write one 'if'. There is a shorter way, see if you can find it, that needs no 'if' statements at all.
Cheers
Greg Locock
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
RE: Simple programming question.
Cheers
Greg Locock
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
RE: Simple programming question.
RE: Simple programming question.
Im getting an error that units dont match when I populate the matrix with different forumals.
any ideas?
RE: Simple programming question.
TTFN
RE: Simple programming question.
Cheers
Greg Locock
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.