IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
Coder
Search Coder Group:

Advanced
-Collapse +Expand Coder Study Test
PRESTWOODCERTIFIED
-Collapse +Expand Coder Store
PRESTWOODSTORE

Prestwood eMagazine

April Edition
Subscribe now! It's Free!
Enter your email:

   ► KBRole-Based T...Coding & OOGeneral Codi...   Print This     
  From the July 2010 Issue of Prestwood eMag
 
Coder General Coding Concepts:
Programming Literals
 
Posted 11 years ago on 1/17/2009
Take Away:

A value directly written into the source code of a computer program (as opposed to an identifier like a variable or constant). Literals cannot be changed. Common types of literals include string literals, floating point literals, integer literals, and hexidemal literals. Literal strings are usually either quoted (") or use an apostrophe (') which is often referred to as a single quote. Sometimes quotes are inaccurately referred to as double quotes.

Coder Definition Flashcard:
 A flashcard from our Coder Flashcards Library
 A definition from our Coder Definitions Page

KB101817

Programming Literals -

A value directly written into the source code of a computer program (as opposed to an identifier like a variable or constant). Literals cannot be changed. Common types of literals include string literals, floating point literals, integer literals, and hexidemal literals. Literal strings are usually either quoted (") or use an apostrophe (') which is often referred to as a single quote. Sometimes quotes are inaccurately referred to as double quotes.


Floating Point Literals

A floating point literal are numbers that have a decimal point or an exponential part. Some languages, such as Java, follow the IEEE 754 Binary Floating-Point Arithmetic standard.

Floating Point 'Equality' Problem

Because computers have trouble representing floating point values, you may want to reserve the use of floating point literals for imprecise measurements such length, height, weight, etc. The very nature of measurements is imprecise.

More Info

Code:  Access VBA Literals (quote)
Code:  ASP Classic Literals (quote)
Code:  C# Literals (quote)
Code:  C++ Literals (quote)
Code:  C++/CLI Literals (qoute)
Code:  Delphi Literals (apostrophe)
Code:  Delphi Prism Literals (quote or apostrophe)
Code:  Java Literals (quote)
Code:  JavaScript Literals (quote or apostrophe)
Code:  ObjectPAL Literals (quote)
Code:  Perl Literals (quote)
Code:  PHP Literals (quote or apostrophe)
Code:  VB Classic Literals (quote)
Code:  VB.Net Literals (quote)

Comments

0 Comments.
Share a thought or comment...
 
Write a Comment...
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P147A1
Enter key:
Definition Contributed By Mike Prestwood:

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains play-drums.com and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Visit Profile

 KB Article #101817 Counter
15174
Since 1/17/2009
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2020 Prestwood IT Solutions.   [Security & Privacy]