What does it mean?

Hello 2 Questions:

If I pass a string its done like Serial.print("ABC");
But sometimes I found functions or such where the String is written like this ('ABC').

Why is sometimes " and sometimes ' used?
Couldn't find anything in the reference and can't remember from back the as I was programming C.

For passing AT commands I would normally use
Serial. print("AT....");
But sometimes in the net I find:
Serial. print(F("AT....") );

So what does this F function do here?

Gorkde:
If I pass a string its done like Serial.print("ABC");

https://www.google.com/search?q=c%2B%2B+string+constant

But sometimes I found functions or such where the String is written like this ('ABC').

https://www.google.com/search?q=c%2B%2B+character+constant

Why is sometimes " and sometimes ' used?

Quotes for strings. Apostrophes for characters.

So what does this F function do here?

https://www.google.com/search?q=arduino+f-macro

Reduce the amount of SRAM used by the sketch.

Thanks!

Yeah I read that but want to understand how, therefore what is the f() doing, ist there any reference where I can read about?

F() is just a macro that forces a cast into the string, which ensures the string stays in flash, and allows the selection of the correct method to read it from there and print it.

Apostrophes for characters.

But only for single characters.

UKHeliBob:
But only for single characters.

Nope.

int multichar = 'AB'; is perfectly legal, as is long multichar = 'name';
Just be careful what you do with them.

AWOL:

long multichar = 'name';

Just be careful what you do with them.

Type of 'name' is int, why do you put it in a long?

is perfectly legal

Legal in the sense that it is accepted by the compiler, but not a habit to get into I think. Can you suggest a legitimate reason for using a multi character char variable ?

In the past, I've used it on low-memory architectures (not unlike the AVR) to avoid the relatively high overhead of a string's terminating null, when storing simple commands or mnemonics.

oqibidipo:
Type of 'name' is int, why do you put it in a long?

On some architectures, long and int are the same size.

I've used it on low-memory architectures (not unlike the AVR) to avoid the relatively high overhead of a string's terminating null,

You know that you are short of memory when literally every byte counts.
Thanks for the example.

UKHeliBob:
You know that you are short of memory when literally every byte counts.
Thanks for the example.

I did once hear of a commercial system (I think it was an alarm system, but it's over 30 years ago) based on a Z-80 that had no RAM, but relied solely on the registers and pre-compiled stack return addreseses.
Personally, I think that was going a bit too far, even back then, but sometimes extra costs are critical.

UKHeliBob:
Can you suggest a legitimate reason for using a multi character char variable ?

Magic numbers.