Skip to main content

Identifier: A Program Element

 Data items of a Computer Program are recognized with the help of Identifiers. Identifiers serve to identify data items. Programming requires use of Identifiers. We can associate Identifiers with digits, alphabets, alphanumeric strings, and boolean values.

RULES FOR IDENTIFIER FORMATION:

( 1 ) Composition of Identifiers:

Only alphabet(s), underscore(s), or digit(s) can come together to form Identifiers.

 ( 2 ) First Occurence Particulars: 

An Identifier is declared to be invalid if a digit occurs in the Identifier at the first place. Either an alphabet , or an underscore (_) can be the occupant of the first place of a well-formed Identifier. One must be careful about the placement of digit(s).

( 3 ) Case Sensitivity Matters: 

Uppercase and lowercase letters have a distinct identity. 'N' and 'n' are altogether different. 'R' and 'r' are treated differently from each other.

( 4 ) Impermissible White spaces: White space inclusion anywhere in an identifier is to be checked. Care must be taken.

______________________________________

Examples of Valid Identifiers:

( A ) x

( B ) found

( C ) BCD2

( D ) a

( E ) _temp

______________________________________

Advantages of Using Identifiers:

( 1 ) Understandability: Data Items become understandable. One can easily tell that the Identifier 'x' is generally for a number. Similarly we can easily say that 'found' is for a boolean(decision).

( 2 ) Readability: Readability of a Computer Program gets improved if a Programmer selects intelligible names for identifiers. 

( 3 ) Qualitative Improvement: Identifiers impact Software Quality. The goodness of a Computer Program that is based on reasonable naming of Identifiers is felt by everyone.

( 4 ) Simplification: Identifiers serve to simplify Computer Programs. Wise decisions related to  identifiers march to make our Computer Programs understandable. Identifier Issues such as width, composition, and sometimes  that resounding punch really helps.

( 5 ) Tracing: Purposeful Identifiers make it easy to trace the details of data processing. The task of tracing the processing activities is facilitated.

( 6 ) Distinctiveness: Identifiers make the appearance of a Computer Program distinct. A Computer Program based on mathematical principles appears different. An Inventory Management  Program looks distinct. Identifiers are responsible for such distinctiveness.



Comments

Popular posts from this blog

Interface Message Processor ( IMP )

Interface Message Processor ( IMP ) is a special purpose Computer. The Processor plays a vital role in Host-to-Host communication. IMP is placed between Host Computers.  IMP helps Hosts to exchange information. IMPs ( Interface Message Processors ) form a group. The group dedicates itself towards reliable transmission of Packets. _________________________ Note: An Interface Message Processor can be supposed to have a face. Firstly this supposed face of IMP is in the direction of the first Host, which sends the  message. Secondly, this face is turned towards the other Host.  Now, the IMP,  with its face turned around, communicates with this other Host.  Transformed message from IMP is communicated to this Host. __________________________ Message ( a piece of information ) sent from the Host ( source of information  ) is transformed into Packets. Transformation of the message into Packets is performed by an IMP. These Packets are forwarded to the receiver H...

Understanding Distribution

Distributed presence means that more than one object is there. Also, these objects are situated at more than one location.  One object may establish communication with another object. The first object may deliver some message. The message can be received by another object. It can be said that object distribution is successful, as one object has succeeded in delivering a message. The second object has successfully received the message. Two objects are at a distance. Communication brings them closer. The successful communication has served to highlight that the idea of distribution is meaningful. Distribution helps exchange of information. Many different objects can form a group.  Two groups can occupy different locations.  It may happen that at a particular location there are several objects. But, all these objects talk among themselves.They talk among themselves and make things happen.  There is a resultant of this talk process. All the communicating objects  at...

Message Switching

Message is a piece of information. Switching means movement.  In a Network there are a number of nodes. Nodes are vital junctions of a Network. Message Switching means transmission from one node ( one point ) of a Network to another node ( another point ). So, transmission is from point to point. Transmission from one point to another point is a single hop ( jump ). Message Switching means switch over of a Message. In one step of Message Switching,  Message switches over from one node to another.  The two nodes involved in a Switching operation are on the same Network. It cannot be that the beginning node ( source node) is on one Network and the second node ( sink node ) is on a different Network. In a point to point ( one junction to another junction ) transmission, a Message travels a part of its journey. Message moves from previous point to next point. The Network is Point-to-Point Network. A Switching activity means movement of a message. Indeed, the Message has mov...