Pages: [1]   Go Down
Author Topic: THE IMPORTANCE OF CAPITALS  (Read 1004 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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 smiley-wink


Logged

Rob Tillaart

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

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48556
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Just try to be consequent in your style
Or consistent... smiley
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Salem, Oregon
Offline Offline
Sr. Member
****
Karma: 7
Posts: 307
Friends don't let friends use Strings
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.  smiley-wink

Lefty
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6137
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you being ironic with your post, or is your shift key broken?
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 604
Posts: 33419
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 291
Posts: 25874
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

"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.

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Re: THE IMPORTANCE OF CAPITALS

...

thank you all for your helP HinTs and tipS

Surely you jest?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 604
Posts: 33419
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 291
Posts: 25874
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

"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.

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 604
Posts: 33419
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes I was still in my mid 50s when I was 57.  smiley
Logged

Pages: [1]   Go Up
Jump to: