COS120-Ch3.2.Strings - COS120 Chapter 3.2 Strings Data...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: COS120 Chapter 3.2 Strings Data Types: The programmer must specify the type of data that will be stored in a variable. Each data type is stored using a unique format and has available to it a certain set of operators and built-in functions. Data Type Description Range Intege r Whole numbers Approx. +/- 2 billion Double Larger floating point numbers 14 digits of precision Data Type Description String Group of characters A character is stored in one byte (8 bits) via its ASCII (ANSI code). For example the code for letter A is: 0100 0001 Most ASCII charts do not list the bit sequence but instead convert the code to an integer and report the integer value. Mathematically, the number 0100 0001 in base 2 is equivalent to 65 in base 10. 0100 0001 = 1 * 2 6 + 1 * 2 = 64 + 1 = 65 The Text property of a Text Box is data type String . Recall the CInt or CDbl functions were used to convert strings of digits into numbers for math processing. Dim x As Double x = CDbl (txtHeight.Text) It is considered proper programming technique to do this manual conversion upon data entry although...
View Full Document

Page1 / 4

COS120-Ch3.2.Strings - COS120 Chapter 3.2 Strings Data...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online