PDA

View Full Version : dynamic asseymblies


rr79
10-25-2002, 03:20 PM
is if then else statements the only expression that one can use in
the expression value?? Has anyone played with this??

Mario
10-28-2002, 01:44 AM
Hallo,

The if-then-else statement is the only structural statement that can be used for expressions.
However using mathematical expressions and other relations allows a wide range of possibilties to express desired behavior.

What exactly are you looking for?

Mario

chris
11-19-2002, 04:14 PM
using conditional operators (<, >, <=, >=, etc) in combination with if-then-else can give you several posibilities, but also logical relations can provide a lot of possibilities.

here's an example:

vnum1=0 (a variable number that will be annimated from 0-20)
vlog1= vnum1 >= 5
vlog2= vnum1 >= 10
vlog3= vnum1 >= 15

each one of the above logical relations (vlogx) is checking if vnum1 is greater than or equal to it's corresponding number. If it is not, vlogx=0 or false. If it is, vlogx=1 or true)

(now put thes logical relations in if statement for an angle relation (ang1))

if vlog1
then 45
else
if vlog2
then 90
else
if vlog3
then 135
else 180

then you simply annimate vnum1 and watch the angle change as vnum1 changes.

Mario
11-20-2002, 12:14 AM
Hi chris,

why would you use the variables vlogx instead of using the logical expression itself ?

Mario

chris
11-22-2002, 03:32 PM
This was just an example, you could use logical expressions here also.

chris