Welcome, Guest. Please Login
 
  HomeHelpSearchLogin FAQ Radified Ghost.Classic Ghost.New Bootable CD Blog  
 
Pages: 1 2 
Send Topic Print
Programming questions (Read 7095 times)
Rad
Radministrator
*****
Offline


Sufferin' succotash

Posts: 4090
Newport Beach, California


Back to top
Re: Programming questions
Reply #15 - Aug 30th, 2009 at 3:18pm
 
Is there a simple way to describe the distinction between 'keywords' and predefined 'identifiers'?

They look like much the same thing to me. Maybe they are used for different purposes.
 
WWW  
IP Logged
 

MrMagoo
Übermensch
*****
Offline


Resident Linux Guru

Posts: 1026
Phoenix, AZ (USA)


Back to top
Re: Programming questions
Reply #16 - Aug 30th, 2009 at 7:30pm
 
Keywords are words that mean something to the compiler/intrepreter.  They can be commands, notations, or several other things, but they are words that the compiler/interpreter has built-in knowledge of.

Identifiers are names that you give to objects.  In the statement

'answer = part1 + cos( angle1 )'

"answer" is an identifier.  It is a name you have given to something (in this case a variable.)  In the same statement, the cos() is a function that computes the cosine of an angle.  'cos' would be a keyword if the function is built into the compiler.  If it is instead the name of a function that you wrote yourself, then it would be an identifier for that function.

Keywords are often also called reserved words, because they are reserved for use by the compiler.
 
WWW  
IP Logged
 
Spanky
Radmeister
**
Offline


Rad's non-Admin Test profile
in Seamonkey

Posts: 73
Same as Rad


Back to top
Re: Programming questions
Reply #17 - Aug 31st, 2009 at 12:18am
 
nice, thanks.

i was having trouble with the identfier part.
 
WWW  
IP Logged
 
Pages: 1 2 
Send Topic Print