Quick question about true and false statement and pinMode

What's a quick command that would set pinMode to input or output depending on true/false statement? If it's true, I want to set output but if it's false then input.

Something like pinMode(6, variable); ? (where variable is the container with 0 or 1 value stored) what I need is to make the pins floating when it's false so the CPU will not interfere with the data on the line, and to set output to inject data when it's true.

There is no such command. But you can code it.

if(...) {pinMode(...);}
else
{pinMode(...);}
pinMode (pinNumber, boolVariable ? INPUT : OUTPUT);

Seems like the last post would do the trick. Thanks!!

Because the Arduino core defines INPUT=0 and OUTPUT=1 you could do this:

pinMode(pinNumber, !boolVariable);

But it's probably not worth it.