>myPIN = 2 ...set this in your IF statements
>low portb.0[myPIN]


That would READ PORTB.2, and set either PORTB.0 or PORTB.1 low depending on the state of RB2(0 or 1).

portb.0[myPIN] = 1 ; lets you control any pin, assuming TRIS has been set

But it can't be used in SERIN/OUT, PULSIN/OUT, RCTIME, HIGH/LOW, etc., like the PIN numbers can.