Passing Vars TO a function

This works

post_frame(2,3);

This doesn't

post_frame(SDI_TAIL,CKI_TAIL);

is it possible to call a function using variables.

I have seen & used before the variables, is that a pointer to the vars?

Called function below.

void post_frame (int SDI, int CKI) {
//Each LED requires 24 bits of data
//MSB: R7, R6, R5..., G7, G6..., B7, B6... B0
//Once the 24 bits have been delivered, the IC immediately relays these bits to its neighbor
//Pulling the clock low for 500us or more causes the IC to post the data.

for(int LED_number = 0 ; LED_number < STRIP_LENGTH ; LED_number++) {
long this_led_color = strip_colors[LED_number]; //24 bits of color data

for(byte color_bit = 23 ; color_bit != 255 ; color_bit--) {
//Feed color bit 23 first (red data MSB)

digitalWrite(CKI, LOW); //Only change data when clock is low

long mask = 1L << color_bit;
//The 1'L' forces the 1 to start as a 32 bit number, otherwise it defaults to 16-bit.

if(this_led_color & mask)
digitalWrite(SDI, HIGH);
else
digitalWrite(SDI, LOW);

digitalWrite(CKI, HIGH); //Data is latched when clock goes high
}
}

What do you mean when you say it doesn't work. Passing variables by value is perfectly legal. Do those variables have a value?

What sort of error are you getting?

This doesn't

post_frame(SDI_TAIL,CKI_TAIL);

Did you declare the variables SDI-TAIL and CKI_TAIL in the sketch as int variables? It's not enough to just declare in the function definition that it is passed two integers. Variables are passed by value unless you use pointers and pass variables by reference (address)

Lefty