PASCAL. PASCAL, like BASIC, is a computer language. However, PASCAL, unlike BASIC, is a Blocked Structured Language (BASIC is known as unstructured).
|
|
- Godwin Reynolds
- 6 years ago
- Views:
Transcription
1 PASCAL 11 OVERVIEW OF PASCAL LANGUAGE PASCAL, like BASIC, is a computer language However, PASCAL, unlike BASIC, is a Blocked Structured Language (BASIC is known as unstructured) Let look at a simple {BLOCK I) {BLOCK II} num_two = 2; num_three = 3; sum : integer; {BLOCK III} sum : = num_two + num_three; writeln (num_two, +, num_three is, sum ); end EXAMPLE is a simple PASCAL program When the program is executed, the following result will be displayed on the terminal is 5 12 GENERAL FORMAT OF PASCAL PROGRAM (1) Program Heading (2) Declaration Section (3) Execution Section 13 GENERAL FORMAT OF PROGRAM HEADING (1) Program Identifier Identify the PASCAL program (2) List of External Files Specify a list of files which will be used by the program to communicate with the outside world 14 GENERAL FORMAT OF DECLARATION SECTION Declaration Section is consisted of (1) Label declaration (2) Constant declaration (3) Type declaration (4) Variable declaration (5) Procedure declaration (6) Function declaration 15 GENERAL FORMAT OF EXECUTION SECTION statement_1; statement_2; end CCASS / Computer Studies / Pascal Programming / Overview P1
2 There are different s of program statements : (1) Basic Statements (2) Control Statements i) Conditional Statements ii) Iterative Statements (3) Sequential File Handling Statements (4) Call subprogram statements (5) Comment Statements 2 OVERVIEW OF DECLARATION SECTION 21 CONSTANT DECLARATION identifier_1 = scalar_ant_1; identifier_2 = scalar_ant_2; pi = 31416; end Valid ant declaration g = 098; {real number} kelvin = -273; {integer} myname = ary ; {string} star = * ; {character} Iloveyou = true; {boolean} twopi = 20 * 31416; {arithmatic expression is accepted} Invalid ant declaration myrange = 1 9; {range is not allowed} Note A ant value cannot be changed by any part of the program min_value = 10; min_value : = 2; {illegal} end CCASS / Computer Studies / Pascal Programming / Overview P2
3 22 Data Type Array Structure Record File Subrange Data Type User-defined Enumerated User-defined Scalar Integer Standard Real Boolean Character Standard Data Type 221 Integer Valid PASCAL integer ants 28000, , 1, 0, 20 maxint (predefined PASCAL ant represent highest integer number) Invalid PASCAL integer ants 1,400 (comas inserted) 123 (decimal inserted) 222 Real Number a) Decimal notation Valid PASCAL Real ants (in decimal notation) , -250, +0188, 01, 11 etc Invalid PASCAL Real ants (in decimal notation) 1 (no leading zero) 3 (no decimal point and fractional part) 1,0000 (comas is inserted) b) Scientific notation 223 Boolean a) true b) false Valid PASCAL Real ants (in Scientific notation) 5e6 (this represent or ) -1e3 (this represent or ) 1e-9 (this represent or ) Invalid PASCAL Real ants (in Scientific notation) -23e2 (decimal after e) 224 Character - (char in short form) enclosed by a pair of SINGLE quotation marks Valid PASCAL Characters 'a' 'b' 'c' '*' '%' ' '' ' Invalid PASCAL Characters a (no quotation marks) "a" (use of double quotation mark is invalid) CCASS / Computer Studies / Pascal Programming / Overview P3
4 23 Variable Declaration - Define an object that can assume different value during the execution of program identifier_1 : data 1; identifier_2 : data 2; name_of_employee_1 : string; name_of_employee_2 : string; salary_of_employee_1 : real; paid_or_not : boolean; account_of_employee_1 : integer; sex_of_employee_1 : char; For the scalar standard data, the declaration of the iable can be directly made However, for all other data, the iable declaration must be made together with the declaration (will be discussed later) examscore = 0100; exam_result = examscore; end 24 Type Declaration 241 Scalar Standard Type - declaration is usually not needed 242 Scalar User-Defined Type (I) real Scalar Subrange Data Type - is a data composed of a specific range of any other standard or user-defined scalar s, except _name_identifier_1 = lower_limit_1upper_limit_1; _name_identifier_2 = lower_limit_2upper_limit_2; examscore = 0100; letter = 'a' 'z' ; exam_result : examscore; #iable declaration will be discussed later exam_result : = 60; end (II) Scalar Enumerated User-Defined Data Type CCASS / Computer Studies / Pascal Programming / Overview P4
5 - a series of data s defined by user _name_identifier_1 = (identifier_1, identifier_2, ) ; _name_identifier_2 = (identifier_3, identifier_4, ) ; day_of_week_ = (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday) day : day_of_week_; if ( ( day = Saturday ) or ( day = Sunday ) ) then writeln ( t is weekend ); for day := Monday to Friday do writeln ( oday is a school day ); end Common errors of Scalar Enumerated User-Defined Data Type a_ = ( brother, sister, son, mother ); b_ = ( brother, daughter, father ); 243 Structure Data Type (I) Array (II) Record (III) File (I) Array - a collection of data objects of identical by a single name _name_identifier_1 = array [t1 t2, t3 t4, ] of base1; _name_identifier_2 = array [t1 t2, t3 t4, ] of base2; 1 a = array [13] of real ; my_number : a; end 2 CCASS / Computer Studies / Pascal Programming / Overview P5
6 program example_2 (input,output); employee_name_ = array [1100] of string; employee_salary_ = array [1100] of integer; employee_name : employee_name_; employee_salary : employee_salary_; end 3 sample_ = array [-5020] of integer; sample : sample_; 4 day_of_the_week = (sun, mon, tue, wed, thur, fri, sat); weekday_ = array [day_of_the_week] of integer; weekday : weekday_; 5 lower_limit = -1 * maxint; upper_limit = maxint; x = array [lower_limit upper_limit] of integer; hello : x; Note i) The lower limit must be smaller than that of the upper limit ii) Both lower limit and upper limit can be negative iii) The base can be array (ie array of array) # Declaration of Record and File structure data will be discussed in later chapters CCASS / Computer Studies / Pascal Programming / Overview P6
Enumerated Types. Mr. Dave Clausen La Cañada High School
Enumerated Types Mr. Dave Clausen La Cañada High School Enumerated Types Enumerated Types This is a new simple type that is defined by listing (enumerating) the literal values to be used in this type.
More informationLecture 3. The syntax for accessing a struct member is
Lecture 3 Structures: Structures are typically used to group several data items together to form a single entity. It is a collection of variables used to group variables into a single record. Thus a structure
More informationOther conditional and loop constructs. Fundamentals of Computer Science Keith Vertanen
Other conditional and loop constructs Fundamentals of Computer Science Keith Vertanen Overview Current loop constructs: for, while, do-while New loop constructs Get out of loop early: break Skip rest of
More informationAIMMS Function Reference - Date Time Related Identifiers
AIMMS Function Reference - Date Time Related Identifiers This file contains only one chapter of the book. For a free download of the complete book in pdf format, please visit www.aimms.com Aimms 3.13 Date-Time
More informationIntroduction to Computers and Programming
Introduction to Computers and Programming Prof. I. K. Lundqvist Lecture 8 Reading: FK pp. 115-151 Sept 17 2003 Type A set of values A set of primitive operations Grouped into classes based on the similarity
More informationArmstrong State University Engineering Studies MATLAB Marina Switch-Case Statements Primer
Armstrong State University Engineering Studies MATLAB Marina Switch-Case Statements Primer Prerequisites The Switch-Case Statements Primer assumes knowledge of the MATLAB IDE, MATLAB help, arithmetic operations,
More informationFeatures of C. Portable Procedural / Modular Structured Language Statically typed Middle level language
1 History C is a general-purpose, high-level language that was originally developed by Dennis M. Ritchie to develop the UNIX operating system at Bell Labs. C was originally first implemented on the DEC
More informationcar object properties data red travels at 50 mph actions functions containing programming statements Program Program variables functions
1 C++ PROGRAMMERS GUIDE LESSON 1 File: CppGuideL1.doc Date Started: July 12,1998 Last Update: Mar 21, 2002 Version: 4.0 INTRODUCTION This manual will introduce the C++ Programming Language techniques and
More informationProgramming Language. Control Structures: Selection (switch) Eng. Anis Nazer First Semester
Programming Language Control Structures: Selection (switch) Eng. Anis Nazer First Semester 2018-2019 Multiple selection choose one of two things if/else choose one from many things multiple selection using
More informationBUP2 5/2 12/4/07 12:49 AM Page 1. Introduction
BUP2 5/2 12/4/07 12:49 AM Page 1 Introduction This booklet will give you easy to follow instructions to allow you to set your BUP2 Programmer to the Weekday/Weekend, (same times Monday - Friday, different
More informationMore non-primitive types Lesson 06
CSC110 2.0 Object Oriented Programming Ms. Gnanakanthi Makalanda Dept. of Computer Science University of Sri Jayewardenepura More non-primitive types Lesson 06 1 2 Outline 1. Two-dimensional arrays 2.
More informationArrays (Lists) # or, = ("first string", "2nd string", 123);
Arrays (Lists) An array is a sequence of scalars, indexed by position (0,1,2,...) The whole array is denoted by @array Individual array elements are denoted by $array[index] $#array gives the index of
More informationMotivation. Each distinct type needs its own I/O library INTEGER FLOAT CHARACTER BOOLEAN. Using pure numbers, we can write nonsense:
A scalar is a single unit of data. Scalar data types are single-valued data types, that can be used for individual variables, constants, etc. Recall the elementary types that we saw earlier: INTEGER FLOAT
More informationArrays III and Enumerated Types
Lecture 15 Arrays III and Enumerated Types Multidimensional Arrays & enums CptS 121 Summer 2016 Armen Abnousi Multidimensional Arrays So far we have worked with arrays with one dimension. Single dimensional
More informationMaintaining the Central Management System Database
CHAPTER 12 Maintaining the Central Management System Database This chapter describes how to maintain the Central Management System (CMS) database using CLI commands as well as using the Content Distribution
More informationIntroduction. Primitive Data Types: Integer. Primitive Data Types. ICOM 4036 Programming Languages
ICOM 4036 Programming Languages Primitive Data Types Character String Types User-Defined Ordinal Types Array Types Associative Arrays Record Types Union Types Pointer and Reference Types Data Types This
More informationC# Fundamentals. Hans-Wolfgang Loidl School of Mathematical and Computer Sciences, Heriot-Watt University, Edinburgh
C# Fundamentals Hans-Wolfgang Loidl School of Mathematical and Computer Sciences, Heriot-Watt University, Edinburgh Semester 1 2018/19 H-W. Loidl (Heriot-Watt Univ) F20SC/F21SC 2018/19
More informationData Types and Variables in C language
Data Types and Variables in C language Basic structure of C programming To write a C program, we first create functions and then put them together. A C program may contain one or more sections. They are
More informationChapter 15. Functional Programming. Topics. Currying. Currying: example. Currying: example. Reduction
Topics Chapter 15 Functional Programming Reduction and Currying Recursive definitions Local definitions Type Systems Strict typing Polymorphism Classes Booleans Characters Enumerations Tuples Strings 2
More informationBASIC ELEMENTS OF A COMPUTER PROGRAM
BASIC ELEMENTS OF A COMPUTER PROGRAM CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING LOGO Contents 1 Identifier 2 3 Rules for naming and declaring data variables Basic data types 4 Arithmetic operators
More informationIntroduction to Python
Introduction to Python Why is Python? Object-oriented Free (open source) Portable Powerful Mixable Easy to use Easy to learn Running Python Immediate mode Script mode Integrated Development Environment
More informationFor each of the following variables named x, specify whether they are static, stack-dynamic, or heapdynamic:
For each of the following variables named x, specify whether they are static, stack-dynamic, or heapdynamic: a) in C++: int* x = new(int); b) in Java: class book { protected string title; book(string x)
More informationDaily Math Week 8 ( ) Mon. October 7, 2013 Tues. October 8, 2013 Wed. October 9, 2013 Thurs. October 10, 2013 Fri.
Daily Math Week 8 (2013-2014) Mon. October 7, 2013 Tues. October 8, 2013 Wed. October 9, 2013 Thurs. October 10, 2013 Fri. October 11, 2013 1 Monday, October 7, 2013 1 st Order from greatest to least:
More informationChapter 6. Data Types
Chapter 6 Data Types Introduction A data type defines a collection of data objects and a set of predefined operations on those objects A descriptor is the collection of the attributes of a variable Copyright
More informationObjectives. Describe ways to create constants const readonly enum
Constants Objectives Describe ways to create constants const readonly enum 2 Motivation Idea of constant is useful makes programs more readable allows more compile time error checking 3 Const Keyword const
More informationPre-Calculus Advanced. Chapter 10 Part 2. Period 8
Pre-Calculus Advanced Chapter 10 Part 2 Period 8 Date Topic of Discussion Assignment Stamp Monday, 4/9 Tuesday, 4/10 Wed 4/11 ½ Day Thu 4/12 Fri 4/13 10.4 Hyperbolas SAT More 10.4 Hyperbolas 10.5 General
More informationEECS402 Lecture 24. Something New (Sort Of) Intro To Function Pointers
The University Of Michigan Lecture 24 Andrew M. Morgan Savicth: N/A Misc. Topics Something New (Sort Of) Consider the following line of code from a program I wrote: retval = oplist[whichop] (mainary, arysize);
More informationC# Types. Industrial Programming. Value Types. Signed and Unsigned. Lecture 3: C# Fundamentals
C# Types Industrial Programming Lecture 3: C# Fundamentals Industrial Programming 1 Industrial Programming 2 Value Types Memory location contains the data. Integers: Signed: sbyte, int, short, long Unsigned:
More informationUsing Variables to Write Pattern Rules
Using Variables to Write Pattern Rules Goal Use numbers and variables to represent mathematical relationships. 1. a) What stays the same and what changes in the pattern below? b) Describe the pattern rule
More informationIndustrial Programming
Industrial Programming Lecture 3: C# Fundamentals Industrial Programming 1 C# Types Industrial Programming 2 Value Types Memory location contains the data. Integers: Signed: sbyte, int, short, long Unsigned:
More informationArrays. Array Basics. Chapter 8 Spring 2017, CSUS. Chapter 8.1
Arrays Chapter 8 Spring 2017, CSUS Array Basics Chapter 8.1 1 Array Basics Normally, variables only have one piece of data associated with them An array allows you to store a group of items of the same
More informationIntroduction Primitive Data Types Character String Types User-Defined Ordinal Types Array Types. Record Types. Pointer and Reference Types
Chapter 6 Topics WEEK E FOUR Data Types Introduction Primitive Data Types Character String Types User-Defined Ordinal Types Array Types Associative Arrays Record Types Union Types Pointer and Reference
More informationMichele Van Dyne Museum 204B CSCI 136: Fundamentals of Computer Science II, Spring
Michele Van Dyne Museum 204B mvandyne@mtech.edu http://katie.mtech.edu/classes/csci136 CSCI 136: Fundamentals of Computer Science II, Spring 2016 1 Review of Java Basics Data Types Arrays NEW: multidimensional
More informationPrivate Swimming Lessons
Private Swimming Lessons Private Lessons Designed for participants who would like a 1:1 ratio. Participants will receive individual attention to improve their swimming technique and have the convenience
More informationScheduling. Scheduling Tasks At Creation Time CHAPTER
CHAPTER 13 This chapter explains the scheduling choices available when creating tasks and when scheduling tasks that have already been created. Tasks At Creation Time The tasks that have the scheduling
More informationCSCE 314 Programming Languages
CSCE 314 Programming Languages Haskell: Declaring Types and Classes Dr. Hyunyoung Lee 1 Outline Declaring Data Types Class and Instance Declarations 2 Defining New Types Three constructs for defining types:
More informationTotal Market Demand Wed Jul 26 Thu Jul 27 Fri Jul 28 Sat Jul 29 Sun Jul 30 Mon Jul 31 Tue Aug 01
MW July 26, 2017 - August 1, 2017 This report provides a summary of key market data from the IESO-administered markets. It is intended to provide a quick reference for all market stakeholders. It is composed
More informationDaily Math Week 10 ( ) Mon. October 21, 2013 Tues. October 22, 2013 Wed. October 23, 2013 Thurs. October 24, 2013 Fri.
Daily Math Week 10 (2013-2014) Mon. October 21, 2013 Tues. October 22, 2013 Wed. October 23, 2013 Thurs. October 24, 2013 Fri. October 25, 2013 1 Monday, October 21, 2013 1 st Solve 2x + 4x 2 = 26 2 Monday,
More informationBasic Elements of C. Staff Incharge: S.Sasirekha
Basic Elements of C Staff Incharge: S.Sasirekha Basic Elements of C Character Set Identifiers & Keywords Constants Variables Data Types Declaration Expressions & Statements C Character Set Letters Uppercase
More informationSOUTH DAKOTA BOARD OF REGENTS. Board Work ******************************************************************************
SOUTH DAKOTA BOARD OF REGENTS Board Work AGENDA ITEM: 1 G DATE: August 7-9, 2018 ****************************************************************************** SUBJECT Rolling Calendar CONTROLLING STATUTE,
More informationBLM2031 Structured Programming. Zeyneb KURT
BLM2031 Structured Programming Zeyneb KURT 1 Contact Contact info office : D-219 e-mail zeynebkurt@gmail.com, zeyneb@ce.yildiz.edu.tr When to contact e-mail first, take an appointment What to expect help
More informationMyOwnDeliveries. a Magento module. User manual
MyOwnDeliveries a Magento module User manual Summary Installation 3 On the front office 4 When ordering 4 When subscribing 6 Booking system 7 Delivery sub areas 7 time slots occupation 7 Reservation windows
More informationChapter 3. Ch 1 Introduction to Computers and Java. Selections
Chapter 3 Ch 1 Introduction to Computers and Java Selections 1 The if-else Statement 2 Flow Chart Deconstructed Decision: Make a choice Start Terminator: Show start/stop points T boolean expression F true
More informationComputing is about Data Processing (or "number crunching") Object Oriented Programming is about Cooperating Objects
Computing is about Data Processing (or "number crunching") Object Oriented Programming is about Cooperating Objects C# is fully object-oriented: Everything is an Object: Simple Types, User-Defined Types,
More informationC++ Basic Elements of COMPUTER PROGRAMMING. Special symbols include: Word symbols. Objectives. Programming. Symbols. Symbols.
EEE-117 COMPUTER PROGRAMMING Basic Elements of C++ Objectives General Questions Become familiar with the basic components of a C++ program functions, special symbols, and identifiers Data types Arithmetic
More informationChapter 6 part 1. Data Types. (updated based on 11th edition) ISBN
Chapter 6 part 1 Data Types (updated based on 11th edition) ISBN 0-321 49362-1 Chapter 6 Topics Introduction Primitive Data Types Character String Types User-Defined Ordinal Types Array Types Associative
More informationToday. o main function. o cout object. o Allocate space for data to be used in the program. o The data can be changed
CS 150 Introduction to Computer Science I Data Types Today Last we covered o main function o cout object o How data that is used by a program can be declared and stored Today we will o Investigate the
More informationConditional Formatting
Microsoft Excel 2013: Part 5 Conditional Formatting, Viewing, Sorting, Filtering Data, Tables and Creating Custom Lists Conditional Formatting This command can give you a visual analysis of your raw data
More informationAlgorithm For Scheduling Around Weekends And Holidays
Algorithm For Scheduling Around Weekends And Holidays Scott Auge scott_auge@amduus.com sauge@amduus.com Introduction We have all heard the phrase x business days for something to be delivered or done.
More informationFundamentals of Programming Languages. Data Types Lecture 07 sl. dr. ing. Ciprian-Bogdan Chirila
Fundamentals of Programming Languages Data Types Lecture 07 sl. dr. ing. Ciprian-Bogdan Chirila Predefined types Programmer defined types Scalar types Structured data types Cartesian product Finite projection
More informationCSCI 150: Exam 1 Practice
CSCI 150: Exam 1 Practice Instructor: Brent Yorgey February 5, 2018 Read all questions carefully before beginning. You will have 50 minutes to complete this exam. You are not allowed to use your notes,
More informationStudy Guide and Review - Rational Numbers
Choose the correct term or number to complete the sentence. 1. 1.875 is an example of a (terminating, repeating) decimal. Because the digits end, 1.875 is a terminating decimal. terminating 2. A common
More informationPreview from Notesale.co.uk Page 6 of 52
Binary System: The information, which it is stored or manipulated by the computer memory it will be done in binary mode. RAM: This is also called as real memory, physical memory or simply memory. In order
More informationInteger Data Types. Data Type. Data Types. int, short int, long int
Data Types Variables are classified according to their data type. The data type determines the kind of information that may be stored in the variable. A data type is a set of values. Generally two main
More informationChapter 2: Objects and Primitive Data
Chapter 2: Objects and Primitive Data Multiple Choice 1. c 2. e 3. d 4. b 5. a 6. e 7. b 8. c 9. d 10. b True/False 1. T 2. F 3. T 4. T 5. T 6. F 7. T 8. T Short Answer 2.1. Explain the following programming
More informationCSCI 150: Exam 1 Practice
CSCI 150: Exam 1 Practice January 12, 2019 Read all questions carefully before beginning. You will have 50 minutes to complete this exam. You are not allowed to use your notes, textbook, phone, or computer.
More informationCOP4020 Programming Assignment 1 - Spring 2011
COP4020 Programming Assignment 1 - Spring 2011 In this programming assignment we design and implement a small imperative programming language Micro-PL. To execute Mirco-PL code we translate the code to
More informationC++ Basics. Lecture 2 COP 3014 Spring January 8, 2018
C++ Basics Lecture 2 COP 3014 Spring 2018 January 8, 2018 Structure of a C++ Program Sequence of statements, typically grouped into functions. function: a subprogram. a section of a program performing
More informationSF - Math Steps, MI test, other review MATH INVENTORY. Week 3-8/28-9/1 - Standards: Lesson Objective/Plan Resources Section in Book Homework
Unit: Number Sense Total Days: Wed, Aug 6, 07 - Thur, Aug, 7, 07 Fri, Aug 8, 07 Unit: Rational Numbers and Exponents Total Days: Week - Wed 8/6-8/8 - Standards: REVIEW: Review Syllabus & Review Week -
More informationDigiPen Institute of Technology
DigiPen Institute of Technology Presents Session Two: Overview of C# Programming DigiPen Institute of Technology 5001 150th Ave NE, Redmond, WA 98052 Phone: (425) 558-0299 www.digipen.edu 2005 DigiPen
More informationObject-Oriented Principles and Practice / C++
Object-Oriented Principles and Practice / C++ Alice E. Fischer April 20, 2015 OOPP / C++ Lecture 3... 1/23 New Things in C++ Object vs. Pointer to Object Optional Parameters Enumerations Using an enum
More informationProgramming in Haskell Aug-Nov 2015
Programming in Haskell Aug-Nov 2015 LECTURE 14 OCTOBER 1, 2015 S P SURESH CHENNAI MATHEMATICAL INSTITUTE Enumerated data types The data keyword is used to define new types data Bool = False True data Day
More informationD. 90% 2. You need of a can of paint to paint one bench. How many cans would you need to paint 8 benches of equal size?
. You are writing a report on video games. You are including the fact that a specific video game has been downloaded 90,000,000 times. Write this number in scientific notation.. You need of a can of paint
More informationProblem Solving. Problem Solving Concept for Computer Science
Problem Solving Problem Solving Concept for Computer Science by Noor Azida Binti Sahabudin Faculty of Computer Systems & Software Engineering azida@ump.edu.my OER Problem Solving by Noor Azida Binti Sahabudin
More informationSeventh Grade Spiraling Review Week 1 of First Six Weeks
Week of First Six Weeks Note: Record all work in your math journal. Day Indicate if each of the given numbers below is equivalent to, less than, or greater than. Justify each response. 0.0, 0 4.7, %,,
More informationif Statement Numeric Rela5onal Operators The if Statement Flow of Control: Branching (Savitch, Chapter 3)
if Statement Flow of Control: Branching (Savitch, Chapter 3) TOPICS Conditional Execution if and Statement Boolean Data switch Statement Ensures that a statement is executed only when some condi5on is
More informationAssessment - Unit 3 lessons 16-21
Name(s) Period Date Assessment - Unit 3 lessons 16-21 1. Which of the following statements about strings in JavaScript is FALSE? a. Strings consist of a sequence of concatenated ASCII characters. b. Strings
More informationLecture Notes on Programming Languages
Lecture Notes on Programming Languages 37 Lecture 04: Data Types and Variables All programming languages provide data types. A data type describes a set of data values and a set of predefined operations
More informationif Statement Numeric Rela7onal Operators The if Statement Flow of Control: Branching (Savitch, Chapter 3)
if Statement Flow of Control: Branching (Savitch, Chapter 3) TOPICS Conditional Execution if,, and if boolean data switch statements CS 160, Fall Semester 2015 1 Programs o-en contain statements that may
More informationTYPES, VALUES AND DECLARATIONS
COSC 2P90 TYPES, VALUES AND DECLARATIONS (c) S. Thompson, M. Winters 1 Names, References, Values & Types data items have a value and a type type determines set of operations variables Have an identifier
More informationCSCI 1061U Programming Workshop 2. C++ Basics
CSCI 1061U Programming Workshop 2 C++ Basics 1 Learning Objectives Introduction to C++ Origins, Object-Oriented Programming, Terms Variables, Expressions, and Assignment Statements Console Input/Output
More information12 CREATING NEW TYPES
Lecture 12 CREATING NEW TYPES of DATA Typedef declaration Enumeration Structure Bit fields Uninon Creating New Types Is difficult to solve complex problems by using programs written with only fundamental
More informationDatatypes, Variables, and Operations
Datatypes, Variables, and Operations 1 Primitive Type Classification 2 Numerical Data Types Name Range Storage Size byte 2 7 to 2 7 1 (-128 to 127) 8-bit signed short 2 15 to 2 15 1 (-32768 to 32767) 16-bit
More informationCSE 452: Programming Languages. Where are we? Types: Intuitive Perspective. Data Types. High-level Programming Languages.
CSE 452: Programming Languages Data Types Where are we? Machine Language High-level Programming Languages Assembly Language Logic Object Oriented Imperative Functional You are here Concepts specification
More informationBASIC COMPUTATION. public static void main(string [] args) Fundamentals of Computer Science I
BASIC COMPUTATION x public static void main(string [] args) Fundamentals of Computer Science I Outline Using Eclipse Data Types Variables Primitive and Class Data Types Expressions Declaration Assignment
More informationCS349/SE382 A1 C Programming Tutorial
CS349/SE382 A1 C Programming Tutorial Erin Lester January 2005 Outline Comments Variable Declarations Objects Dynamic Memory Boolean Type structs, enums and unions Other Differences The Event Loop Comments
More informationBoolean Data-Type. Boolean Data Type (false, true) i.e. 3/6/2018. The type bool is also described as being an integer: bool bflag; bflag = true;
Programming in C++ If Statements If the sun is shining Choice Statements if (the sun is shining) go to the beach; True Beach False Class go to class; End If 2 1 Boolean Data Type (false, ) i.e. bool bflag;
More informationCSCI 150: Exam 1 Practice
CSCI 150: Exam 1 Practice Instructor: Mark Goadrich and Gabriel Ferrer September 13, 2016 Read all questions carefully before beginning. You will have 1 hour to complete this exam. You are not allowed
More informationChapter. Solving Problems that Require Decisions. Objectives: At the end of the chapter students should be able to:
Chapter 13 Solving Problems that Require Decisions Objectives: At the end of the chapter students should be able to: Design programs that correctly use decision logic Correctly write and evaluate simple
More informationUNIVERSITY OF SWAZILAND SUPPLEMENTARY EXAMINATION, JULY 2013
UNIVERSITY OF SWAZILAND SUPPLEMENTARY EXAMINATION, JULY 2013 Title of Paper : STRUCTURED PROGRAMMING - I Course number: CS243 Time allowed Instructions : Three (3) hours. : (1) Read all the questions in
More informationChapter 21: Introduction to C Programming Language
Ref. Page Slide 1/65 Learning Objectives In this chapter you will learn about: Features of C Various constructs and their syntax Data types and operators in C Control and Loop Structures in C Functions
More informationCSCI312 Principles of Programming Languages!
CSCI312 Principles of Programming Languages! Chapter 5 Types Xu Liu! ! 5.1!Type Errors! 5.2!Static and Dynamic Typing! 5.3!Basic Types! 5.4!NonBasic Types! 5.5!Recursive Data Types! 5.6!Functions as Types!
More informationDECISION CONTROL AND LOOPING STATEMENTS
DECISION CONTROL AND LOOPING STATEMENTS DECISION CONTROL STATEMENTS Decision control statements are used to alter the flow of a sequence of instructions. These statements help to jump from one part of
More informationValues, types and variables
Values, types and variables Contents Overview Simple types in HBasic Declare and use variables Variables of type object Operator Predefined functions Enum definition User defined types Constant definitions
More informationDATA AND ABSTRACTION. Today you will learn : How to work with variables How to break a program down Good program design
DATA AND ABSTRACTION Today you will learn : How to work with variables How to break a program down Good program design VARIABLES Variables are a named memory location Before you use a variable you must
More informationSOUTH DAKOTA BOARD OF REGENTS. Board Work ******************************************************************************
SOUTH DAKOTA BOARD OF REGENTS Board Work AGENDA ITEM: 3 C DATE: March 30 April 1, 2016 ****************************************************************************** SUBJECT: Rolling Calendar During the
More informationPart No. P CallPilot. Programming Record
Part o. P0941757 01.1 CallPilot Programming Record 2 P0941757 01.1 About the CallPilot Programming Record 3 Use this guide to record how you program your CallPilot 100/150 or Business Communications Manager
More informationPayflow Implementer's Guide FAQs
Payflow Implementer's Guide FAQs FS-PF-FAQ-UG-201702--R016.00 Fairsail 2017. All rights reserved. This document contains information proprietary to Fairsail and may not be reproduced, disclosed, or used
More informationPROGRAMMAZIONE I A.A. 2017/2018
PROGRAMMAZIONE I A.A. 2017/2018 TYPES TYPES Programs have to store and process different kinds of data, such as integers and floating-point numbers, in different ways. To this end, the compiler needs to
More informationOPERATING MANUAL- MODEL : BS-101
OPERATING MANUAL- MODEL : BS-101 Refer the attached connection diagram to install Slave units in all classrooms of your premises. Part Id is mentioned on the sticker pasted on right side of each Slave
More informationFrancesco Nidito. Programmazione Avanzata AA 2007/08
Francesco Nidito in the Programmazione Avanzata AA 2007/08 Outline 1 2 3 in the in the 4 Reference: Micheal L. Scott, Programming Languages Pragmatics, Chapter 7 What is a type? in the What is a type?
More informationSchedule/BACnet Schedule
Object Dictionary 1 Schedule/BACnet Schedule Introduction Note: The Johnson Controls Schedule object is considered a BACnet Schedule object because it supports BACnet functionality. In addition, this object
More informationDigital Design Using VHDL Using Xilinx s Tool for Synthesis and ModelSim for Verification Part II
Digital Design Using VHDL Using Xilinx s Tool for Synthesis and ModelSim for Verification Part II Ahmed Abu-Hajar, Ph.D. abuhajar@digitavid.net Digitavid, Inc San Jose, CA VHDL Lexical Description Code
More informationCalendar PPF Production Cycles Non-Production Activities and Events
20-207 Calendar PPF Production Cycles Non-Production Activities and Events Four Productions For non-holiday productions 7 Week Stage Cycles 36 Uses plus strike (as in prior years and per agreement with
More informationBeginning Programming (Pascal) Lecture 75. Figure 1. type-declarations. simple-type. pointer-type. array-type. file-type. set-type.
-declarations -identifier = ; ; Figure 1. -declarations simple- pointer- array- file- set- record- Figure 2. simple- standard- subrange- enumerated- Figure 3. simple- standard- boolean char integer real
More informationNights & Weekend ROB & PHIL DECEMBER 12, 2008
Nights & Weekend ROB & PHIL DECEMBER 12, 2008 Input Surveys R&IS Student Assistant R&IS Faculty & Staff Access Services Students Statistics Totals Services R&IS & Access Service Seniority R&IS Student
More informationJavaScript I Language Basics
JavaScript I Language Basics Chesapeake Node.js User Group (CNUG) https://www.meetup.com/chesapeake-region-nodejs-developers-group START BUILDING: CALLFORCODE.ORG Agenda Introduction to JavaScript Language
More informationOrganization of Programming Languages CS3200 / 5200N. Lecture 06
Organization of Programming Languages CS3200 / 5200N Razvan C. Bunescu School of Electrical Engineering and Computer Science bunescu@ohio.edu Data Types A data type defines a collection of data objects
More informationChapter-8 DATA TYPES. Introduction. Variable:
Chapter-8 DATA TYPES Introduction To understand any programming languages we need to first understand the elementary concepts which form the building block of that program. The basic building blocks include
More informationINFORMATION TECHNOLOGY SPREADSHEETS. Part 1
INFORMATION TECHNOLOGY SPREADSHEETS Part 1 Page: 1 Created by John Martin Exercise Built-In Lists 1. Start Excel Spreadsheet 2. In cell B1 enter Mon 3. In cell C1 enter Tue 4. Select cell C1 5. At the
More information