How to write "then"

Ive had a look at the reference home page but cant find what I need, I want to write a code where one function followed by the other in sequence triggers another function. The two functions will not happen at the same they will happen one after the other. So in theory what i need is

if (LDRpin1 < 50 THEN LDRpin2 < 50) // If LDR1 falls below a value of 50 followed by LDR2 falling below a value of 50
{
digitalWrite(LEDpin1, HIGH) // if both happen in sequence light up LEDpin1

Ive had a look at the reference home page but cant find what I need

Because it doesn't exist.

You can use && (in place of THEN) to make the code syntactically correct, but that will do nothing about the comment.

You haven't really posted enough of your code to give you a very useful answer...

There's no built-in 'THEN' feature as you're describing. You'll either need to track everything via state variables, or nest conditionals (if you know the two events will happen at the same time).

What does THEN signify in terms of timing?

i.e.
Do you mean that both LDRpin1 < 50 and LDRpin2 < 50 at the same time?
Do you mean that any time in the next __ seconds after LDRpin1 < 50 when LDRpin2 < 50?
Do you mean any point ever, regardless of how long between pin1 and pin2?
Do you want the program to be able to do other things while waiting on pin2?
Or, should we deadlock until pin2 < 50?

If you're referring to this

int LDRpin1 = 0; //LDR1 in analog pin 0
int LDRpin2 = 1;

you posted earlier, you've got the problem that you're confusing the pin name with the value that you should be reading from that pin with an analogRead.

However, as has been pointed out, there is no concept of "after" or "then", and the test in your code(if they were syntactically correct) would be executed just a few microseconds apart.

If you are taking about ---> IF THEN

That is BASIC. In C / C++, no THEN.

Just :

if ( variable == 1 )
{
    // then do inside the braket
}

else 
{
    // then else do inside this braket
}

If ... Then

What you are really asking would look like this in another language -

if condition1 then
if condition2 then
stuff for both conditions.
endif 'condition 2
endif 'condition2

In C this would look like this -

if (condition1) {
if (condition2){
stuff for both conditions
}
}

or

if ( (condition1) && (condition2) ) {
stuff to do for the conditions
}

The first form allows you to also trap for more secondary conditions.

philmorejive:

// If LDR1 falls below a value of 50 followed by LDR2 falling below a value of 50

If you are trying to detect and handle sequences of events then a finite state machine is probably what you need.