Just wanted to ask what does this do

``````display(val);
``````

I tryed looking in the reference tab but couldn’t get anything. If anyone can help me I would be very grateful.

P.S. here's some more code with the "display function:

``````PORTD = PORTD & 0x00
PORTD = display[x];
``````

arduinohabib:
Just wanted to ask what does this do

``````display(val);
``````

I tryed looking in the reference tab but couldn't get anything. If anyone can help me I would be very grateful.

Looks like a function call to a function named 'display' with an argument named 'value'. You'll have to give more information if you want a more specific answer. For example, do you include any libraries that might define the 'display' function?

arduinohabib:
P.S. here's some more code with the "display function:

``````PORTD = PORTD & 0x00
``````

PORTD = display;

This looks like an array named 'display' is being indexed by the variable named 'x'. Again, I don't see a declaration of 'display' or 'x' so I can't be sure.

It's some code for a seven segment display(that's right Mr. John), here's some more code.

``````display[] = {
B00111111, // 0
B00000110, // 1
B01011011, // 2
B01001111, // 3
B01100110, // 4
B01101101, // 5
B01111011, // 6
B00000111, // 7
B01111111, // 8
B01101111, // 9
}
// write the digits, assume PORTD with bit0 = asegment, 1=b,2=c,3=d,4=e,5-f,6=g, 7=decimal point it used
//    a
// f    b
//    g
// e   c
//    d
// clear the bits
PORTD = PORTD & 0x00
// now set the font
PORTD = display[x]; // x = 0 to 9, or bigger if define some other characters: A,b,C,d,E,F,H,L,P,U, -,_,
``````