very basic syntax Qs

Well I've got my first sketch working on the uno and I'm wondering about the example programs I've seen.

first, are there differences among "1, true, HIGH, True, high" for a digital state variable??

when is uppercase and lowercase important, eg is "digitalRead" the same as "digitalread"

Can you nest functions, like: digitalWrite(ledPin,digitalRead(buttonPin)) to have the output at ledPin match the state of buttonPin?

can pinMode change within a sketch?

first, are there differences among "1, true, HIGH, True, high" for a digital state variable??

The Arduino has predefined constants that make 1 = HIGH = true but not equal to True or high, case must match. Also 0 = LOW = false but not equal to False or low. At least that is my recall.

when is uppercase and lowercase important, eg is "digitalRead" the same as "digitalread"

No, case is important, those are two different labels. And only digitalRead() is a valid predefined function.

Can you nest functions, like: digitalWrite(ledPin,digitalRead(buttonPin)) to have the output at ledPin match the state of buttonPin?

Yes you can and some like to do that to make code as short and concise as possible. Others can think it can sometimes be too terse and cute and harder to understand later. Your choice.

can pinMode change within a sketch?

Will not change by itself, however you can use pinMode commands anywhere in a sketch.

Lefty

Thanks Lefty

I just realised another interesting thing about sketches, if I am correct: They loop forever implicitly without any other structure. If so then a sketch built around something like a switch case is always reevaluated every time it reaches the end, is that correct?

is that correct?

It is.

They loop forever implicitly without any other structure.

As Paul said that is true. If you do wish to put a complete stop to everything, I've seen some use a empty infinite while loop to 'trap' the loop function.

Lefty