Go Down

Topic: THE IMPORTANCE OF CAPITALS (Read 1 time) previous topic - next topic

oldgeezer

after spending an hour on trying 2 type a program from the getting started book ive learnt the importance of capitals in the correct place and also with or without val in brackets.for example 02 it seems the way val is written ,int val = 0; and in, if  (val == high ); and val = digitalRead  determins if the program will verify.in some places a capital v dosnt seem to matter and in others it does.its very confusing.also the online 02 turn on led button while button pressed isnt the same as the book version with one using val and the other buttonstate or am i missreading it.hopefully the next example will prove easier.many thanks from richard

robtillaart


Most computer languages today are case sensitive and it is a matter of style what to use. Just try to be consequent in your style as that improves readability when you see your own code in 6 months ;)


Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

PaulS

Quote
Just try to be consequent in your style

Or consistent... :)

retrolefty

Capitalization is the difference between "I had to help my uncle Jack off a horse.." and "I had to help my uncle jack off a horse.."

Lefty

Brad Burleson


Capitalization is the difference between "I had to help my uncle Jack off a horse.." and "I had to help my uncle jack off a horse.."

Lefty


<comic book guy>Best....Reply....Ever....</comic book guy>

My apologies, I couldn't help it.

Brad.

retrolefty



Capitalization is the difference between "I had to help my uncle Jack off a horse.." and "I had to help my uncle jack off a horse.."

Lefty


<comic book guy>Best....Reply....Ever....</comic book guy>

My apologies, I couldn't help it.

Brad.


No problem, that's was the effect I was going for. You don't know how long I've keep that little beauty under wrap waiting for the proper straight line to use it.  ;)

Lefty

James C4S

Are you being ironic with your post, or is your shift key broken?
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Nick Gammon


after spending an hour on trying 2 type a program from the getting started book ive learnt the importance of capitals in the correct place ...


Capitals are important in English too, you know. You start a sentence with a capital. The word "I" is capitalized, as is "I've".

"trying 2 type" doesn't make sense. Do you mean "trying to type"?

http://cynthia-jones-shoeman.suite101.com/sloppy-writing-says-you-dont-care-enough-a124537

Quote
"I had to help my uncle Jack off a horse.."


A search for that finds a lot of pictures of horses, and uncles. :)

Grumpy_Mike

Quote
in some places a capital v dosnt seem to matter and in others it does.its very confusing.

It always matters. Where you may think it dosn't is the names of variables, and functions, but these have to be consistant. But by convention if a variable is in all capitals it is a constant given by a #define.

A single = is an assign, make this equal to that.
A double == is a logical comparison, is this equal to that?

If the OP wants to ask nan thing specific then please do.

oldgeezer

thank you all for your helP HinTs and tipS.when i was young none of this existed until the sinclair mk14 appeared in the 60,s for home constructers and useres? the :smiley-sleep:n the zx80/81.i still have some of these which use basic as a programming language so may dig one out,make an interface and try my hand.many thanks from richard x bernie

AWOL

Quote
sinclair mk14 appeared in the 60,

Out by at least 10 years. The technology for the Mk14 at that price-point didn't exist until at least the mid 70s.

BTW, you do know that capitalising titles is considered online to be shouting, and rude, don't you?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Nick Gammon

Quote
Re: THE IMPORTANCE OF CAPITALS


...


thank you all for your helP HinTs and tipS


Surely you jest?

Grumpy_Mike

Quote
The technology for the Mk14 at that price-point didn't exist until at least the mid 70s.

Well 1977 according to this:-
http://en.wikipedia.org/wiki/MK14

AWOL

http://en.wikipedia.org/wiki/SC/MP
Quote
The SC/MP from National Semiconductor is an early microprocessor, which became available in early 1974.

That's pretty close to mid-70s, I think.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Grumpy_Mike

Yes I was still in my mid 50s when I was 57.  :)

Go Up