Data types
This presentation is the property of its rightful owner.
Sponsored Links
1 / 5

Data Types PowerPoint PPT Presentation


  • 60 Views
  • Uploaded on
  • Presentation posted in: General

Data Types. Basic data types: Text Numeric Numeric data stored by numeric variables Text data stored by string, text, or character variables – surrounded by “ “ (ie. “color”). Types of Data. Numeric Data Integer data (whole numbers) 10 25 -45 0

Download Presentation

Data Types

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Data types

Data Types

  • Basic data types:

    • Text

    • Numeric

  • Numeric data

    • stored by numeric variables

  • Text data

    • stored by string, text, or character variables –

    • surrounded by “ “ (ie. “color”)


Data types

Types of Data

  • Numeric Data

    • Integer data (whole numbers)

      • 10 25 -45 0

    • Real (Floating point) data (numbers that have a decimal point)

      • 23.5 -5.0

    • Note: 5 and 5.0 are stored differently in a computer even though they have the same value. The first, 5 is an Integer but the second, 5.0 is a Real number.

  • Character data (alphanumerics)

    • All the characters you can type at the keyboard

    • The type is String or Character


Data types

  • Numeric data types:

    • Integer: whole numbers only

    • Floating-point: fractional numeric values with decimal points


Data types

  • Numeric Data

    • Integer data (whole numbers)

      • 10 25 -45 0

    • Real (Floating point) data (numbers that have a decimal point)

      • 23.5 -5.0

    • Note: 5 and 5.0 are stored differently in a computer even though they have the same value. The first, 5 is an Integer but the second, 5.0 is a Real number.

  • Character data (alphanumerics)

    • All the characters you can type at the keyboard

    • The type is String or Character


Concatenation

Concatenation

  • Concatenation takes two strings and joins them to create a string result

  • The concatenation operator is symbolized, in pseudocode, with a + sign

  • Example: if:

  • String1 = “yellow” and String2 = “duckie”

  • then the statement:

  • Set MyFriend = String1 + String2

  • results in:

  • MyFriend = “yellow duckie”


  • Login