INT213-Week-2 Working with Variables. What is variable

Slides:



Advertisements
Similar presentations
Operators & Identifiers The Data Elements. Arithmetic Operators exponentiation multiplication division ( real ) division ( integer quotient ) division.
Advertisements

Introduction to Computing Concepts Note Set 7. Overview Variables Data Types Basic Arithmetic Expressions ▫ Arithmetic.
Primitive Data Types There are a number of common objects we encounter and are treated specially by almost any programming language These are called basic.
Constants and Data Types Constants Data Types Reading for this class: L&L,
Javascript Essentials How do I write it??  Start Homesite  Between the start and end BODY tags type: 
Variables and Constants
Introduction to Programming with Java, for Beginners Primitive Types Expressions Statements Variables Strings.
CIS 234: Using Data in Java Thanks to Dr. Ralph D. Westfall.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Fundamentals of Strings and Characters Characters.
CSI 101 Elements of Computing Spring 2009 Lecture #6: Data Types and Variables in Visual Basic Wednesday, Februrary 11th, 2009.
Developing Software Applications Introduction to Variables & Data Types in VB State Transition Diagrams.
Data types and variables
Slide 1 Variables, Constants and Data Types. Slide 2 Variables v Three components define a variable: –Name (memory location) –Type –Information (value)
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie COMP 14 Introduction to Programming Adrian Ilie June 27, 2005.
Chapter 2 Data Types, Declarations, and Displays
VB Code Statements 3 types of VB statement The Remark statement, known as comments, are used for project documentation only Begin with an apostrophe Not.
CSci 142 Data and Expressions. 2  Topics  Strings  Primitive data types  Using variables and constants  Expressions and operator precedence  Data.
String Escape Sequences
The Data Element. 2 Data type: A description of the set of values and the basic set of operations that can be applied to values of the type. Strong typing:
Java Primitives The Smallest Building Blocks of the Language (corresponds with Chapter 2)
2440: 211 Interactive Web Programming Expressions & Operators.
National Diploma Unit 4 Introduction to Software Development Data types, variables and constants.
Chapter 2: Using Data.
CISC 110 Day 1 Hardware, Algorithms, and Programming.
CPS120: Introduction to Computer Science
Tutorial 6 Introducing Variables, Memory Concepts & Arithmetic.
Primitive Variables.
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
VBScript Language. What is VBScript Based on the Visual Basic family of languages Supports object oriented features Interpreted Loosely Typed Implicitly.
Mathematical Calculations in Java Mrs. G. Chapman.
Operators & Identifiers The Data Elements. Arithmetic Operators exponentiation multiplication division ( real ) division ( integer quotient ) division.
CS346 Javascript -3 Module 3 JavaScript Variables.
Computer Engineering 1 st Semester Dr. Rabie A. Ramadan 3.
Primitive Variables.
Copyright Curt Hill Variables What are they? Why do we need them?
CNS 1120 Exam 1 Review. Programming Language Elements Syntax = the rules to follow Syntax = the rules to follow Semantics = the meaning of symbols Semantics.
Data Types Declarations Expressions Data storage C++ Basics.
Copyright © – Curt Hill Types What they do.
1 Scripting Languages VBScript - Recognized mainly by Internet Explorer only - Netscape does have a plug-in JavaScript - Recognized by Internet Explorer.
Mathematical Calculations in Java Mrs. C. Furman.
Introduction to Programming Lecture Note - 2 Visual Basic Programming Fundamentals.
Programming in Java (COP 2250) Lecture 4 Chengyong Yang Fall, 2005.
Data Tonga Institute of Higher Education. Variables Programs need to remember values.  Example: A program that keeps track of sales needs to remember.
# 1# 1 What is a variable that you create? What is a constant that you create? What is an intrinsic (built-in) constant? What variables are built in?
CIVIL AND GEOMATIC ENGINEERING FT Okyere. CIV 257- COMPUTER PROGRAMMING Lecture 3.
Variables Hold information that may be manipulated, used to manipulate other information or remembered for later use A storage location in memory (RAM)
CECS 5020 Computers in Education Visual Basic Variables and Constants.
Variables Continued In the last session we saw how variables are objects that allow us to store values in the RAM of the computer In this session we shall.
VB.NET 2008 Introduction to Variables Part 1. Overview.NET Languages –Source Code –Compiler –MSIL –CLR & Windows Variables –Data Types –Converting.
Variables in VB. What is a variable? ► A named memory location that stores a value.
VCE IT Theory Slideshows By Mark Kelly vceit.com Version 2 – updated for 2016 Data Types 1 a.
DATA TYPES, VARIABLES AND CONSTANTS. LEARNING OBJECTIVES  Be able to identify and explain the difference between data and information  Be able to identify,
Data Handling in Algorithms. Activity 1 Starter Task: Quickly complete the sheet 5mins!
Creation of Variables with Numeric, alphanumeric, date, picture, memo data types Constant - A quantity that does not change during the execution of a program.
Slide 1 Chapter 3 Variables  A variable is a name for a value stored in memory.  Variables are used in programs so that values can be represented with.
Slide 1 Chapter 3 Variables  A variable is a name for a value stored in memory.  Variables are created using a declaration statement. For example: Dim.
Lecture 3: More Java Basics Michael Hsu CSULA. Recall From Lecture Two  Write a basic program in Java  The process of writing, compiling, and running.
What will each of the following lines print? System.out.println("number" ); number645 System.out.println("number" + (6 + 4)+ 5); number105 System.out.println(6.
Chapter 2 Variables and Constants. Objectives Explain the different integer variable types used in C++. Declare, name, and initialize variables. Use character.
© 2004 Pearson Addison-Wesley. All rights reserved August 27, 2007 Primitive Data Types ComS 207: Programming I (in Java) Iowa State University, FALL 2007.
A variable is a name for a value stored in memory.
Primitive Data Types August 28, 2006 ComS 207: Programming I (in Java)
Multiple variables can be created in one declaration
Chapter 6 Variables What is VBScript?
VB Variables and Data
Intro to Programming Concepts
Variables Here we go.
COMS 261 Computer Science I
Quick Test Professional Training Part 1
Variables and Constants
Presentation transcript:

INT213-Week-2 Working with Variables. What is variable Types of variables used in ASP Naming convention of Variables Use of Const variable and Arrays Math and Comparison Operators, Concatenation. Finally, simple Exercise Practice.

Variables & Data Types There are many different types of data you might need to store into a variable: Number, string, dates and Times and so many more. A variable is an identifier what holds values in its own memory address. So a variable represents a storage place in the computer memory (RAM). That storage has to be given a name so it will be easy to call on that variable anywhere in the script. When you name a variable you dimension it. To dimension a variable use the Dim command. Ex: <% dim num %>

Variable Types Integer: Long and Byte Long can store larger number Byte can store fewer number. Single for smaller fractional number Double for larger fractional number and require twice memory than single. Date it can hold either Date or Time. Boolean for True/False Currency Special data type that works with several special VBScript functions. VBScript use Variant variable.

Naming Variable in VBScript. Do not use spaces, period, or dashes. Variable name must begin with a letter. Variable names should no longer than 255 characters. Do not use reserved word Do not reuse variable name.

Constant and Array A constant is like a variable, you can give it a name and store data into it. Ex:<% Const PI=3.14159 %> Array is a data type, a sequence of variables with same name but holding different values.

Math & Comparison Operators Addition, Subtraction, Multiplication and Division Integer Division EX: 5 \ 3 returns 1 Modulus Ex: 5 mod 3 returns 2

Simple Exercise focused on all topics. Follow the lecture and instructions.