can I call one function from within another?

I have not included all the code as it is quite long and does other things not related to the problem.

}
void writeArduinoOnMatrix1() {
  /* here is the data for the characters */
  byte a[8]={B00111100,B01111110,B11100111,B11001011,B11010011,B11100111,B01111110,B00111100,};
  lc.setRow(0,0,a[0]);  lc.setRow(0,1,a[1]);  lc.setRow(0,2,a[2]);  lc.setRow(0,3,a[3]);
  lc.setRow(0,4,a[4]);  lc.setRow(0,5,a[5]);  lc.setRow(0,6,a[6]);  lc.setRow(0,7,a[7]);
}  
void writeArduinoOnMatrix2() {             
  byte a[8]={B11111111,B11111110,B11100000,B11010000,B11001000,B11000100,B11000010,B10000001,};
  lc.setRow(0,0,a[0]);  lc.setRow(0,1,a[1]);  lc.setRow(0,2,a[2]);  lc.setRow(0,3,a[3]);
  lc.setRow(0,4,a[4]);  lc.setRow(0,5,a[5]);  lc.setRow(0,6,a[6]);  lc.setRow(0,7,a[7]);
}
void writeArduinoOnMatrix3() {             
  byte a[8]={B11111111,B01111111,B00000111,B00001011,B00010011,B00100011,B01000011,B10000001,};
//  diplayThem();
   lc.setRow(0,0,a[0]);   lc.setRow(0,1,a[1]);   lc.setRow(0,2,a[2]);   lc.setRow(0,3,a[3]);
   lc.setRow(0,4,a[4]);   lc.setRow(0,5,a[5]);   lc.setRow(0,6,a[6]);   lc.setRow(0,7,a[7]);
}
void writeArduinoOnMatrix4() {
 // here is the data for the characters
  byte a[8]={B00011000,B00111000,B00111000,B00011000,B00011000,B00011000,B00111100,B00111100,};
  diplayThem();
/*   lc.setRow(0,0,a[0]);   lc.setRow(0,1,a[1]);   lc.setRow(0,2,a[2]);   lc.setRow(0,3,a[3]);
   lc.setRow(0,4,a[4]);   lc.setRow(0,5,a[5]);   lc.setRow(0,6,a[6]);   lc.setRow(0,7,a[7]);*/  
}
void diplayThem(){
  lc.setRow(0,0,a[0]);  lc.setRow(0,1,a[1]);  lc.setRow(0,2,a[2]);  lc.setRow(0,3,a[3]);
  lc.setRow(0,4,a[4]);  lc.setRow(0,5,a[5]);  lc.setRow(0,6,a[6]);  lc.setRow(0,7,a[7]);
}

a set of 'if's in the void main() call the functions, Ic.setRow calls a library to send the info to a matrix, the first three work fine, I noticed that the last half of every function is the same and there will be many functions, so I commented out the last half of the forth one and added a new function diplayThem (it was displayThem but display is a key word so I just removed that as being a possible fault.

I think my problem is that I am assigning the variable 'a' as a byte within the function so it is not recognised outside it but how can I get round this?
If I assign 'a' globally and remove 'byte' from the function it tells me it expects a primary expression before the { token.

matelot:
I think my problem is that I am assigning the variable 'a' as a byte within the function so it is not recognised outside it but how can I get round this?

Either pass it as a parameter or make it global.

If I assign 'a' globally and remove 'byte' from the function it tells me it expects a primary expression before the { token.

Probably because you did something wrong.

do you agree that my problem is due to the variable 'a' being assign within the function and it is not recognised outside the function?

Yes, you can call one function from another. To pass data to a function you generally pass arguments. I'd do something like this:

void writeArduinoOnMatrix4() {
  diplayThem(B00011000,B00111000,B00111000,B00011000,B00011000,B00011000,B00111100,B00111100);
}
void diplayThem(byte r0, byte r1, byte r2, byte r3, byte r4, byte r5, byte r6, byte r7){
  lc.setRow(0,0,r0);  lc.setRow(0,1,r1);  lc.setRow(0,2,r2);  lc.setRow(0,3,r3);
  lc.setRow(0,4,r4);  lc.setRow(0,5,r5);  lc.setRow(0,6,r6);  lc.setRow(0,7,r7);
}

matelot:
do you agree that my problem is due to the variable 'a' being assign within the function and it is not recognised outside the function?

You can't assign multiple values to elements of the array using the curly brace notation outside of it's declaration. If you want to change it's values, you must assign the values to the elements individually.

OK John thank you I will try that now.

matelot:
do you agree that my problem is due to the variable 'a' being assign within the function and it is not recognised outside the function?

That is the main problem.

If you want to pass the data as an array:

void writeArduinoOnMatrix4() {
 // here is the data for the characters
  // Note the use of the 'static' keyword so the array doesn't have to be re-created each time the function is called.
  static byte a[8]={B00011000,B00111000,B00111000,B00011000,B00011000,B00011000,B00111100,B00111100,};
  diplayThem(a); 
}
void diplayThem(byte a[]) {
  lc.setRow(0,0,a[0]);  lc.setRow(0,1,a[1]);  lc.setRow(0,2,a[2]);  lc.setRow(0,3,a[3]);
  lc.setRow(0,4,a[4]);  lc.setRow(0,5,a[5]);  lc.setRow(0,6,a[6]);  lc.setRow(0,7,a[7]);
}

If lc.setRow() is declared with the third argument being a constant you can make the code a little safer with:

void writeArduinoOnMatrix4() {
 // here is the data for the characters
  // Note the use of the 'static' keyword so the array doesn't have to be re-created each time the function is called.
  // Note the use of the 'const' keyword to make sure the contents of the array can't easily be changed
  static const byte a[8]={B00011000,B00111000,B00111000,B00011000,B00011000,B00011000,B00111100,B00111100,};
  diplayThem(a); 
}
void diplayThem(const byte a[]) {
  lc.setRow(0,0,a[0]);  lc.setRow(0,1,a[1]);  lc.setRow(0,2,a[2]);  lc.setRow(0,3,a[3]);
  lc.setRow(0,4,a[4]);  lc.setRow(0,5,a[5]);  lc.setRow(0,6,a[6]);  lc.setRow(0,7,a[7]);
}

thank you john that works perfectly and uses even less space than I was going to do.
thanks for the prompt reply.
the box below your name shows you off line?