Discussion Forums at Tactical Neuronics


Re: Question about the workabiltiy of a piece of code From:
Vusak

> Would this piece of code work?
> cmath v0=(((v4 < v3)*0+2)or((v5 < v3)*0+4))or (((v6 < v3)*0+3)or((v7 < v3)*0+4))
> If not why and how would it need to be changed in order to work?

coz on the right hand side of the assignment operator(=) you gotta reference user variables with a tilde sign(~)

cmath v0 = (((~v4 < ~v3)*0+2)OR((~v5 < ~v3)*0+4))OR(((~v6 < ~v3)*0+3)OR((~v7 < ~v3)*0+4))

however this equation seems to be rather ineffectual because with those zeroes it really is

cmath v0 = (0+2)OR(0+4)OR(0+3)OR(0+4)
= 2 OR 4 OR 3 OR 4
= ALWAYS TRUE

Vusak

This message is a Reply to: Question about the workabiltiy of a piece of code from jeremiah

Replies to this message:


© 2001, John A. Reder.