Paskal Dil Karşılaştırması

Slides:



Advertisements
Similar presentations
Procedural Programming in C# Chapters Objectives You will be able to: Describe the most important data types available in C#. Read numeric values.
Advertisements

Programming Languages and Paradigms The C Programming Language.
C# Language Report By Trevor Adams. Language History Developed by Microsoft Developed by Microsoft Principal Software Architect Principal Software Architect.
Chapter 3 DATA: TYPES, CLASSES, AND OBJECTS. Chapter 3 Data Abstraction Abstract data types allow you to work with data without concern for how the data.
Chapter 41 Variables and JSP Control Structures JavaServer Pages By Xue Bai.
Lecture # 21 Chapter 6 Uptill 6.4. Type System A type system is a collection of rules for assigning type expressions to the various parts of the program.
CS-1010 Dr. Mark L. Hornick 1 Selection Statements and conditional expressions.
Primitive Variable types Basic types –char (single character or ASCII integer value) –int (integer) –short (not longer than int) –long (longer than int)
Translating Pseudocode into computer languages Lecture 14.
Java Syntax Primitive data types Operators Control statements.
How Create a C++ Program. #include using namespace std; void main() { cout
CS 225 Java Review. Java Applications A java application consists of one or more classes –Each class is in a separate file –Use the main class to start.
CIS Computer Programming Logic
DAT602 Database Application Development Lecture 5 JAVA Review.
 For Loops › for (variable set; condition; incremental or decrement){ // loop beginning › } // loop end  While loops › while (condition) { // beginning.
C Tokens Identifiers Keywords Constants Operators Special symbols.
Language Elements 1. Data Types 2 Floating Point (real) Single Precision Double Precision Decimal Fixed Point (integer) Byte Short Integer Long Numerical.
C-Language Keywords(C99)
CSCI 3328 Object Oriented Programming in C# Chapter 5: C# Control Statement – Part II UTPA – Fall
C Derived Languages C is the base upon which many build C++ conventions also influence others *SmallTalk is where most OOP comes Java and Javascript have.
Hello.java Program Output 1 public class Hello { 2 public static void main( String [] args ) 3 { 4 System.out.println( “Hello!" ); 5 } // end method main.
C STRUCTURES. A FIRST C PROGRAM  #include  void main ( void )  { float height, width, area, wood_length ;  scanf ( "%f", &height ) ;  scanf ( "%f",
Primitive Variables.
CompSci 100E 2.1 Java Basics - Expressions  Literals  A literal is a constant value also called a self-defining term  Possibilities: o Object: null,
Java Programming Java Basics. Data Types Java has two main categories of data types: –Primitive data types Built in data types Many very similar to C++
C++ Basics. Compilation What does compilation do? g++ hello.cpp g++ -o hello.cpp hello.
Programming with Visual C++: Concepts and Projects Chapter 3A: Integral Data (Concepts)
Java Programming, Second Edition Chapter Two Using Data Within a Program.
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
Chapter One Lesson Three DATA TYPES ©
CS-1010 Dr. Mark L. Hornick 1 Selection and Iteration and conditional expressions.
Arrays What is an array… –A data structure that holds a set of homogenous elements (of the same type) –Associate a set of numbers with a single variable.
Chapter 2 Creating a C++ Program. Elements of a C++ Program Four basic ways of structuring a program Four basic ways of structuring a program 1.Sequencing.
CS 115 OBJECT ORIENTED PROGRAMMING I LECTURE 11 GEORGE KOUTSOGIANNAKIS 1 Copyright: 2015 Illinois Institute of Technology_ George Koutsogiannakis.
1 Lecture # 2. * Introducing Programming with an Example * Identifiers, Variables, and Constants * Primitive Data Types * Byte, short, int, long, float,
C syntax (simplified) BNF. Program ::= [ ] Directives ::= [ ] ::= | |… ::=#include > ::=#define.
Chapter 2 Variables and Constants. Objectives Explain the different integer variable types used in C++. Declare, name, and initialize variables. Use character.
Welcome to Computer Programming II! Computer Programming II Summer 2015.
Topics introduced today (these topics would be covered in more detail in later classes) – Primitive Data types Variables Methods “for” loop “if-else” statement.
C++ Lesson 1.
Chapter 1.2 Introduction to C++ Programming
Two-Dimensional Arrays
Basic Introduction to C#
IGCSE 4 Cambridge Data types and arrays Computer Science Section 2
Chapter 1.2 Introduction to C++ Programming
Data types Data types Basic types
Written by Al.So. Software solutions
Two Dimensional Array Mr. Jacobs.
Variables A variable is a placeholder for a value. It is a named memory location where that value is stored. Use the name of a variable to access or update.
Lecture 2: Data Types, Variables, Operators, and Expressions
Programming Languages and Paradigms
BY GAWARE S.R. COMPUTER SCI. DEPARTMENT
Programming Paradigms
null, true, and false are also reserved.
Java - Data Types, Variables, and Arrays
Introduction to Java Programming
An Introduction to Java – Part I, language basics
An overview of Java, Data types and variables
Data type List Definition:
Recap Week 2 and 3.
CMPE212 – Reminders The other four assignments are now posted.
OBJECT ORIENTED PROGRAMMING I LECTURE 11 GEORGE KOUTSOGIANNAKIS
CS150 Introduction to Computer Science 1
2. Second Step for Learning C++ Programming • Data Type • Char • Float
CS150 Introduction to Computer Science 1
Fundamental Programming
Module 2 Variables, Data Types and Arithmetic
Agenda Types and identifiers Practice Assignment Keywords in Java
C Language B. DHIVYA 17PCA140 II MCA.
Variables and Constants
Presentation transcript:

Paskal Dil Karşılaştırması Aslı Ergün

Veri Türleri Pseudocode Pascal/Delphi C++ Integer Floating point Boolean Character String Single, Real, Double Char int, long float, double bool char string -2,147,483,648 to 2,147,483,647 (4 byte) 5.0 x 10^-324 to 1.7 x 10^308 (8 byte) True/False (1 bit) ASCII karakter, 1 byte

Veri Türleri var a: char; text1: string; c: Real; // c: Single; veya c: Double; d: Boolean; Year: Integer; begin a := 'H'; text1 := 'Hello World!'; c := 4.5; d := True; Year := 2017; end

Fonksiyon Tanımlama Pseudocode Pascal/Delphi C++ Name Statement/s END PROCEDURE Name(parameter if any); BEGIN Statement/s ; END; FUNCTION Name(parameter if any): datatype; statement/s; Name := returnValue; or RESULT := returnValue; void Name(parameter if any); { } ; datatype Name(parameter if any) return value; };

Değişken ve Sabit Tanımlama Pseudocode Pascal/Delphi C++ Variable Declaration VAR variableName1,...:datatype; datatype variableName1, ... ; CONSTNAME = value CONST CONSTNAME = value; const datatype CONSTNAME = value;

Değer Atama Pseudocode Pascal/Delphi C++ SET variableName TO value or variableName = value variableName := value ; variableName = value ;

Mantık Operatörleri Pseudocode Pascal/Delphi C++ operand = operand operand NOT = operand operand < operand operand > operand operand <= operand (operand = operand) (operand <> operand) (operand < operand) (operand > operand) (operand <= operand) (operand == operand) (operand != operand)

Mantık bağlaçları Pseudocode Pascal/Delphi C++ operand AND operand operand OR operand operand NOT operand NOT (operand) (operand && operand) (operand || operand) ! (operand)

IF ELSE karar yapısı Pseudocode Pascal/Delphi C++ IF (condition) THEN True statement/s block ELSE False statement/s block ENDIF BEGIN True statement/s block; END False statement/s block; END; if (condition) { } else };

Switch karar yapısı Pseudocode Pascal/Delphi C++ CASE OF single_variable value_1 : statement block_1 value_2 : statement block_2 ... value_n : statement block_n ...... value_other : statement block_other ENDCASE CASE single_variable OF value_1 : statement block_1; value_2 : statement block_2; value_n : statement block_n; ELSE statement block_other; END; SWITCH (single_variable) { case value_1 : statement/s ; break; case value_2 : statement/s; case value_n : statement/s; default: statement/s; };

DO WHILE döngüsü Pseudocode Pascal/Delphi C++ DO statement/s WHILE (condition) REPEAT statement/s; UNTIL NOT (condition); do { } while (condition); DOWHILE (condition) ENDDO WHILE (condition) DO BEGIN END; while (condition) };

Repeat döngüsü Pseudocode Pascal/Delphi C++ REPEAT statement/s UNTIL (condition) statement/s; UNTIL (condition); do { } while !(condition);

FOR döngüsü Pseudocode Pascal/Delphi C++ DO counter = begin TO end statement/s ENDDO FOR counter := begin TO end DO BEGIN statement/s; END; for (counter = begin; counter <= end; counter++) { };

Kayıtlar(Records) Pseudocode Pascal/Delphi C++ Record structures recordName fieldname1 fieldname2 ... fieldnameN TYPE recordName = RECORD field1 : datatype; field2 : datatype; .... fieldN: datatype; END; struct recordNameType { datatype field1; datatype field2; datatype fieldN; };

Diziler(Arrays) Pseudocode Pascal/Delphi C++ Declaring arrays One-dimensional SET arrayName(maxNumElements) VAR arrayName : ARRAY[begin .. end] OF datatype; datatype arrayName [maxNumElements]; Two-dimensional SET arrayName (row, column) arrayName : ARRAY[begin ..maxrow, begin..maxcolumn] OF datatype; [row][columns]; Processing Array Elements Assigning a value arrayName (index) = value Reading a value variableName = arrayName (index) arrayName [index] := value; variableName := arrayName [index]; arrayName [index] = value ; variableName = arrayName [index];