Algorithmic "imperative" language

Size: px
Start display at page:

Download "Algorithmic "imperative" language"

Transcription

1 Algorithmic "imperative" language Undergraduate years Epita November 2014 The aim of this document is to introduce breiy the "imperative algorithmic" language used in the courses and tutorials during the undergraduate studies at Epita. Only the syntax is shown here, it is not a coding course. However, you will nd (if you look closely) some valuable tips! Created by Nathalie "Junior" Bouquet Translated by Christophe "Krisboul" Boullay Proofread by Steve "Bobfan" Frank

2 Contents 1 Algorithm: presentation General structure of an algorithm Algorithm Writing Rules Alphabet and lexicon The "words" of the language Identier naming conventions Keywords Word dividers Special symbols Comments Declarations Constant declarations Type declarations Variable declarations Procedures and Functions (routines) Routine declaration Syntax Parameters and variables The parameters Local - Global Parameter declaration (local) declarations Identier Scope The procedures The functions Syntax Return Types Predened Types Types dened by the "coder" Enumerations Declaration Use Arrays Declaration Use Records Declaration Use Typed pointers Declaration Use

3 2 CONTENTS 4 Expressions Expressions: syntax Operators Arithmetic operators Logical operators (and "bitwise") Comparison operators/relational operators String concatenation Expression evaluation rules Operator precedence Type mismatch Statements Direct assignment Syntax Functioning Function and procedure calls Procedure call: an instruction Function call: an expression Conditional statements if...then...else...end if statements Syntax Functioning Case and switch statements: case of...do...end case Syntax Functioning Loop statements Repetition statements while...end while do...while Iteration statement: for...end for

4 Chapter 1 Algorithm: presentation The language presented here is the one used during algorithmic courses and tutorials ("imperative" part) of the two undergraduate years of Epita. There are two "levels" of use: in class, where we will directly use abstract types with their operations, and in tutorials, where the abstract types will be represented using structured types and where the operations will have to be implemented as routines General structure of an algorithm Here is the general structure of an algorithm. It is composed of two distinct parts: declarations (before begin) and instructions (between begin and end). algorithm algo_identier begin <constants, types and variables> <instructions> end algorithm algo_identier ˆ <constants, types and variables> : detailed later in this chapter ; ˆ <routines*> : presented in the following chapter ; ˆ <instructions> :presented in chapter 5. *We will hardly ever write full algorithms. To respond to questions, we will rather write "subalgorithms" (called "routines"): functions and procedures. Typographic Note: in all parts of this document the algorithmic elements will be described as follows: keywords identiers <item to be fixed> [optional items]... to indicate that the current structure can be repeated. 1 The next logical step is the implementation machine, which is almost reduced to the translation in the selected language.

5 4 CHAPTER 1. ALGORITHM: PRESENTATION 1.2 Algorithm Writing Rules Alphabet and lexicon The "words" of the language As for all languages (and not only in coding, even in Klingon), we must, at rst, dene an alphabet (characters used) and the words which allow us to construct sentences (for example, instructions in this case). Two kinds of words will be present in an Algorithm; Keywords, predened words in the language, and identiers, words created to "name" the variables, the types, the routines... For the latter, there exist very strict rules of construction Identier naming conventions An identier is a valid word created to name: a constant, a type, a variable, a routine (function or procedure), a parameter, the main algorithm. The identiers can only contain characters lying within the following ranges: 'a'..'z' 'A'..'Z' '0'..'9' We can also use the character '_' (underscore). To construct an identier, you must respect the following rules: It can't start by a digit. Algorithmic language algorithmique doesn't distinguish between uppercase and lowercase. Obviously, an identier has to be dierent from a keyword, this is to avoid any ambiguity. The use of identiers follows these rules: To be used (in the instruction part), any identier must be declared before (in the declaration part). To nish, to simplify the writing and reading of algorithms, it is strongly recommended to use explicit identiers Keywords Keywords will be used to construct the algorithms, the declarations and the instructions. These are predened in the language. As for identiers, no dierence is made between uppercase and lowercase. Keyword 2 list of the algorithmic language: algorithm div global parameters else then record until procedure while otherwise and local for types constants do mod return variables begin end not case decreasing function or if 2 useful!

6 1.3. DECLARATIONS Word dividers Special symbols The structure of the algorithm, the statements, and the instructions are made so that there is no need of special separators (the dierent parts are simply in sequence). All parts that are started are explicitly nished. We only use the comma "," as word divider for the parameter lists in the routine calls. However, the newline is necessary before starting a new instruction or a new declaration. Some characters and character combinations have special meaning for the algorithmic language. Here's the list: (or <-) (or ^)., : /* */ < > <= >= <> = + - * / ( ) Comments It is possible to insert comments into the algorithm at any place. Ignored by the compiler, the comments are not part of the algorithm and do not eect its running. So this is just for understanding! Comments are delimited by pairs of symbols /* and */.. We can also use // that allows us to put in comment everything that follows in the same line. 1.3 Declarations Here we will declare all we need for the algorithm: constants, types, variables (as well as procedures and functions that are presented in the following chapter). <declaration part> : <constant declarations> <type declarations> <variable declarations> The order of the declarations is important, and it can not be changed. We will see here the constant, type, and variable declarations Constant declarations constants constant_ident = <value>... A constant can not be modied in the algorithm Type declarations types type_ident = <type definition>... Here are specied all the types which we will dene later (see section 3.2).

7 6 CHAPTER 1. ALGORITHM: PRESENTATION Variable declarations The variables contain the data used by the algorithm. When we declare variables we must assign them a type. The latter must be dened 3. That is to say: either predened in the language or dened by ourselves (see chapter 3). That is why types must be declared before variables. variables type_ident variable_ident 1, variable_ident 2, Each line contains a list of variables of the specied type (for clarifying we can dene multiple lists for the same type). Warning: there is no symbol between the type and the identiers! 3 We apply a rule that is very important and valid everywhere: you can not use what is not already known! Therefore, when you want to use something, ensure that it has already been declared, or is predened in the language.

8 Chapter 2 Procedures and Functions (routines) 2.1 Routine declaration A routine is a sequence of program instructions that perform a specic task and then branch back (return): A "sub-algorithm" we can use it as one step in a larger program and it can be started (called) several time. Syntax algorithm <routine> [<parameters declarations>] [<declarations>] begin <instructions> end algorithm <routine> routine_ident [: type_ident] routine_ident with <routine> = procedure or function. 2.2 Parameters and variables The parameters Local - Global Any routine can dene parameters not present in the main algorithm. These are input data, provided when calling the routine from another algorithm place. There are two kinds of parameters: The locals and the globals. Local parameter: A local copy of the argument is passed to the routine, which will work on this copy (call by value). Thus, any change performed by the routine will not be passed on to the data passed as a parameter. So that when the call is done, the parameter may receive a local expression (a value) as an eective parameter. Global parameter: There is no copy of the argument, which has to be a variable. The global parameter is link to the variable passed when calling. It must be provided for each global parameter an existing variable name, not an expression, because the routine may change the passed variable (call by reference (by address)).

9 8 CHAPTER 2. PROCEDURES AND FUNCTIONS (ROUTINES) Parameter declaration The parameter declaration is made like a declaration of variables, with two parts to separate local and global parameters: local parameters type_ident ident_param1, ident_param2, parametres globaux type_ident ident_param1, ident_param2, The declaration order does not matter, but it can have only one declaration of local parameters and only one of global parameters (local) declarations In addition to the parameter declarations, the declarations that follow are the same as for a simple algorithm, except for the routines. So we can declare constants and types, but rarely: constants and types to be shared by all routines are declared in the main algorithm. However, it is frequent to declare variables. These are called local variables belonging to the current routine, unlike the global variables, declared at an higher level (see 2.2.3). It is strongly recommended to use only local variables in the body of the function in which they are declared and not global variables (in fact it is obligatory!). Only "subroutines" may be missing: if the procedure or function has to call another, the latter must have been declared before Identier Scope The scope of a variable identier or parameter is the part of the algorithm in which the identier is recognized according to its declaration. In other words, all the code lines in which this identier is used will reference the data it denes. An identier will be "visible" in the algorithm where it was declared and in any sub-algorithm called, but never in a higher level. It is possible to have scope conicts, that is to say that a nesting level of routine declares an identier bearing the name of another existing identier of a higher level. Then the rule is the following: the closest version (most deeply nested) of the identier has the priority. There is a rule to add for the construction of identiers: in a declaration block, two identiers can not be identical. However, if they are declared in dierent scopes, two identiers can be identical, but they can then lead to a conict of reach. However, the scope of conict should not pose a problem, insofar as only identiers dened in this routine will be used in the routine! 1 Always the same rule "I am only speaking about what I know", which should be applied more often!

10 2.3. THE PROCEDURES The procedures The procedure is a routine that returns nothing. The call for a procedure is an instruction: once the subroutine's task is done, we branch back (return) to the next instruction after the call. 2.4 The functions A function is a processing routine which returns a value. Therefore, the function call is a value (see 5.2.2). Syntax algorithm function function_ident : return_type_ident [parameters local type_ident param_ident......] [parameters global type_ident param_ident......] [variables type_ident...] begin <instructions> param_ident... return <value> end algorithm function function_ident The return type has to be a simple type (integer, character, Boolean, pointer) or a string. Return The value calculated by the function is returned by the instruction return that is followed by an expression. This one must necessarily be included in the function instructions. The return is debranching: its execution terminates the function. So this implies: ˆ Any subsequent instruction after will not be taken into account. ˆ There can be only one executed return. The debranching "power" of return is sometimes used to allow quitting an algorithm before the end 2. That said, this should denitively be avoided unless it is impossible to do otherwise: this is even forbidden to the poor little students of the 1st year undergraduate by the tyrannical teacher in charge of tutorials! 2 We can besides use return without argument in the procedures (there, I've said it!)

11 Chapter 3 Types 3.1 Predened Types The predened types of the algorithmic language are: integer signed integer numbers 42 real signed foating point numbers boolean enumerated type representing values true et false character ANSI character represented by a byte 'a' string character strings "hello" 3.2 Types dened by the "coder" Enumerations Enumerations are lists of identiers representing legibly a sequence of values linked logically. Declaration types enum_ident = ( value_ident 1, value_ident 2,...) Use Identiers are used as constants and can be directly assigned to variables of the enumerated type Arrays Arrays allow us to associate, in a same variable, several data of the same type. Declaration One-dimensional arrays types array_ident = <integer> elts_type_ident The integer can be a value, or a constant integer identier. The element type can be a predened type, or a new type that must have been declared before. Multidimensional arrays In this case, it is sucient to give as many integers as dimensions. types array_ident = <integer 1 > <integer 2 >... elts_type_ident

12 3.2. TYPES DEFINED BY THE "CODER" 11 Use Access to an array element is done by indicating an index for each dimension. var_ident [<index 1 >, <index 2 >,...] Then we obtain a variable of the element type. Strings can be used as character arrays: s[i] is the character at position i in s for all 1 i length(s) Records A record is a data structure that includes, in a single logical entity, several elements of dierent types. Declaration Use types record_ident = record type_ident 1 eld_ident 11, eld_ident 12,... type_ident 2 eld_ident 21, eld_ident 22, end record record_ident To access the contents of a record, the dot notation is used: we give the name of the record (the identier of the variable), followed by a dot (.) and the eld name you want to access. var_ident.eld_ident Typed pointers A pointer is data which contains the memory address of a variable. The typed pointer points to a variable that has a specic type. Characteristic of this type declaration: it is the only one that can use a previously undeclared type identier. 2 Declaration types pointer_ident = pointed_type_ident Use To access to the pointed variable: var_ident 1 Warning: There is no function length on arrays. 2 This allows us to declare recursive types.

13 Chapter 4 Expressions An expression is a sequence of calculations that can involve constants, variables, functions, and operators. The expressions are used everywhere in the algorithm: in assignments, as routine parameters, in the control structures, etc. 4.1 Expressions: syntax An expression can be: a value 42 a variable x a constant C a function call cos(x) <expression> BinaryOperator <expression> UnaryOperator <expression> 32 + x not A (<expression>) (a + 15) Operators Arithmetic operators Classicals: - (unary) + Addition - Subtraction * Multiplication / Division The operands can be of type integer (the result is integer) or real (the result is real), except for the division, with which the result, will always be of type real. See the Implicit type conversion (page 13) for the hybrid cases. integer division: div mod integer division modulo (remainder of the integer division) These operators only work with integer parameters, and the result is an integer Logical operators (and "bitwise") Operands are Boolean, so it is a logical operation. The result is a boolean. Boolean expressions are used as conditions in control structures. not logical negation and logical and or logical or 12

14 4.3. EXPRESSION EVALUATION RULES 13 Reminders: With a and b booleans or booleans expressions: a and b: is only true if a is true and b is true, is false when one of the two is false. a or b: is only false if a is false and b is false, is true when one of the two is true. Important: The operators and and or are sequentials: if the evaluation of the rst operand is sucient to give the result, the second operand will not be evaluated. That is to say: if a is false, a and b will be false, without evaluation of b Comparison operators/relational operators Both operands must be of compatible types. The result is always type boolean: true or false String concatenation = equal to <> not equal to < less than > greater than <= less than or equal to >= greater than or equal to The operator + may be used with the character strings and the characters for the concatenation. 4.3 Expression evaluation rules Operator precedence In decreasing order: unary operators - not multiplicative operators * / div mod and additive operators + - or relational operators = < <= > >= <> Expressions in parentheses are evaluated before being used in the next calculations Type mismatch A "binary" operator can only works with two values of the same type. There is an exception when one value is a real and the other one is an integer. In this case, the integer value is automatically promoted to a real value. This rule also applies to arithmetic operators (+, -, *, /) and comparison operators.

15 Chapter 5 Statements 5.1 Direct assignment This instruction allow us to assign a value to a variable. The value can be an expression of any type compatible with the variable type Syntax var_ident <expression> avec var_ident: a variable identier ; an array element ; a record eld ; a pointed variable. Note: from there, variable will represent one of these four elements Functioning variable <value> A value (an expression) can not be on the left side of an assignment instruction. A variable on the right side of an assignment (and more generally in any expression) must contain a value. 5.2 Function and procedure calls Calling a procedure or function (a routine) is done by its name, possibly followed, by the list of arguments in parentheses. The declaration order of the parameters must be respected. When the call is by reference (global parameter), the argument must be a variable. If it is called by value (local parameter), it can be any expression (see page 7). The distinction between the dierent parameters will be seen in detail in the procedure and function chapter (chap. 2) Procedure call: an instruction The procedure call is an instruction in itself: procedure_ident (param1, param2,...)

16 5.3. CONDITIONAL STATEMENTS 15 Examples of procedures: input-output The displaying procedures: write (value 1, value 2,... ) write ("Hello", x) display the character string "Hello", followed by the content of the variable x (provided that x contains a value). The reading procedure: read (variable) read (x) assigns to the x the entered value Function call: an expression A function is a routine that returns a value. Therefore, the function call will be usable as any other values (in an expression, as routine parameter, etc.). For instance in an assignment expression: var_ident function_ident (param1, param2,...) A lone function call is not an instruction! 5.3 Conditional statements if...then...else...end if statements Syntax if <boolean expression> then <instructions> [ else <instructions> ] end if The else <instruction> part is optional. Warning: the endif is obligatory! It will be the same for all structured instructions: this end tag must be present even if there is only one instruction. Functioning if the condition (expressed by the boolean expression) is true then the instruction sequence placed after then will be run. In the opposite case, the instruction sequence placed after else will be run if it exists, otherwise nothing will happen Case and switch statements: case of...do...end case Syntax case of <expression> do <expr_liste> : <instructions>... [ otherwise <instructions>] end case

17 16 CHAPTER 5. STATEMENTS <expr_liste> = a list of values (separated by commas) for the expression. The expression must be of scalar type: integer, character and the enumerations. Functioning The run instructions are those corresponding to the expression value 1. If this value is not in one of the lists, it is the otherwise part (if it exists) that will be run. 5.4 Loop statements Repetition statements while...end while Syntax while <boolean> <instructions> end while do Functioning The instructions are repeated until the condition is veried. The test is at the beginning of the loop, so the instructions may never be executed. Warning: It is obligatory that the condition becomes false at some point. For that, it requires that the boolean expression contains at least one variable that will be modied in the loop. do...while Syntax do <instructions> while <boolean expression> Functioning The condition is placed at the end. Therefore the instructions will be run at least once, and until the condition becomes false. Of course, the boolean expression constraint stays the same Iteration statement: for...end for It allows us to repeat a series of instructions a determined number of times. Syntax for var_ident <begin_expr> to [ downto] <end_expr> do <instructions> end for Functioning The variable must be of scalar type: integer, character and the enumerations. Start and end expressions must be compatible with it. It takes successively all values between the two bounds (in decreasing order if specied). It is impossible to change the planned number of iterations: the loop, variable and the bounds can in no way be changed in the loop! 1 Warning: there is no connection with the Caml pattern matching!

Lexical Considerations

Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Fall 2005 Handout 6 Decaf Language Wednesday, September 7 The project for the course is to write a

More information

1 Lexical Considerations

1 Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2013 Handout Decaf Language Thursday, Feb 7 The project for the course is to write a compiler

More information

The PCAT Programming Language Reference Manual

The PCAT Programming Language Reference Manual The PCAT Programming Language Reference Manual Andrew Tolmach and Jingke Li Dept. of Computer Science Portland State University September 27, 1995 (revised October 15, 2002) 1 Introduction The PCAT language

More information

Lexical Considerations

Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2010 Handout Decaf Language Tuesday, Feb 2 The project for the course is to write a compiler

More information

Language Reference Manual simplicity

Language Reference Manual simplicity Language Reference Manual simplicity Course: COMS S4115 Professor: Dr. Stephen Edwards TA: Graham Gobieski Date: July 20, 2016 Group members Rui Gu rg2970 Adam Hadar anh2130 Zachary Moffitt znm2104 Suzanna

More information

Advanced Algorithms and Computational Models (module A)

Advanced Algorithms and Computational Models (module A) Advanced Algorithms and Computational Models (module A) Giacomo Fiumara giacomo.fiumara@unime.it 2014-2015 1 / 34 Python's built-in classes A class is immutable if each object of that class has a xed value

More information

FRAC: Language Reference Manual

FRAC: Language Reference Manual FRAC: Language Reference Manual Justin Chiang jc4127 Kunal Kamath kak2211 Calvin Li ctl2124 Anne Zhang az2350 1. Introduction FRAC is a domain-specific programming language that enables the programmer

More information

\n is used in a string to indicate the newline character. An expression produces data. The simplest expression

\n is used in a string to indicate the newline character. An expression produces data. The simplest expression Chapter 1 Summary Comments are indicated by a hash sign # (also known as the pound or number sign). Text to the right of the hash sign is ignored. (But, hash loses its special meaning if it is part of

More information

Full file at

Full file at Java Programming: From Problem Analysis to Program Design, 3 rd Edition 2-1 Chapter 2 Basic Elements of Java At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class

More information

Visual C# Instructor s Manual Table of Contents

Visual C# Instructor s Manual Table of Contents Visual C# 2005 2-1 Chapter 2 Using Data At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class Discussion Topics Additional Projects Additional Resources Key Terms

More information

LESSON 1. A C program is constructed as a sequence of characters. Among the characters that can be used in a program are:

LESSON 1. A C program is constructed as a sequence of characters. Among the characters that can be used in a program are: LESSON 1 FUNDAMENTALS OF C The purpose of this lesson is to explain the fundamental elements of the C programming language. C like other languages has all alphabet and rules for putting together words

More information

The SPL Programming Language Reference Manual

The SPL Programming Language Reference Manual The SPL Programming Language Reference Manual Leonidas Fegaras University of Texas at Arlington Arlington, TX 76019 fegaras@cse.uta.edu February 27, 2018 1 Introduction The SPL language is a Small Programming

More information

Learning Language. Reference Manual. George Liao (gkl2104) Joseanibal Colon Ramos (jc2373) Stephen Robinson (sar2120) Huabiao Xu(hx2104)

Learning Language. Reference Manual. George Liao (gkl2104) Joseanibal Colon Ramos (jc2373) Stephen Robinson (sar2120) Huabiao Xu(hx2104) Learning Language Reference Manual 1 George Liao (gkl2104) Joseanibal Colon Ramos (jc2373) Stephen Robinson (sar2120) Huabiao Xu(hx2104) A. Introduction Learning Language is a programming language designed

More information

CPS122 Lecture: From Python to Java

CPS122 Lecture: From Python to Java Objectives: CPS122 Lecture: From Python to Java last revised January 7, 2013 1. To introduce the notion of a compiled language 2. To introduce the notions of data type and a statically typed language 3.

More information

Chapter 2 Using Data. Instructor s Manual Table of Contents. At a Glance. Overview. Objectives. Teaching Tips. Quick Quizzes. Class Discussion Topics

Chapter 2 Using Data. Instructor s Manual Table of Contents. At a Glance. Overview. Objectives. Teaching Tips. Quick Quizzes. Class Discussion Topics Java Programming, Sixth Edition 2-1 Chapter 2 Using Data At a Glance Instructor s Manual Table of Contents Overview Objectives Teaching Tips Quick Quizzes Class Discussion Topics Additional Projects Additional

More information

Chapter 1 Summary. Chapter 2 Summary. end of a string, in which case the string can span multiple lines.

Chapter 1 Summary. Chapter 2 Summary. end of a string, in which case the string can span multiple lines. Chapter 1 Summary Comments are indicated by a hash sign # (also known as the pound or number sign). Text to the right of the hash sign is ignored. (But, hash loses its special meaning if it is part of

More information

Introduction to Visual Basic and Visual C++ Arithmetic Expression. Arithmetic Expression. Using Arithmetic Expression. Lesson 4.

Introduction to Visual Basic and Visual C++ Arithmetic Expression. Arithmetic Expression. Using Arithmetic Expression. Lesson 4. Introduction to Visual Basic and Visual C++ Arithmetic Expression Lesson 4 Calculation I154-1-A A @ Peter Lo 2010 1 I154-1-A A @ Peter Lo 2010 2 Arithmetic Expression Using Arithmetic Expression Calculations

More information

68000 Assembler by Paul McKee. User's Manual

68000 Assembler by Paul McKee. User's Manual Contents 68000 Assembler by Paul McKee User's Manual 1 Introduction 2 2 Source Code Format 2 2.1 Source Line Format............................... 2 2.1.1 Label Field............................... 2 2.1.2

More information

Ruby: Introduction, Basics

Ruby: Introduction, Basics Ruby: Introduction, Basics Computer Science and Engineering College of Engineering The Ohio State University Lecture 3 Ruby vs Java: Similarities Imperative and object-oriented Classes and instances (ie

More information

CMPT 125: Lecture 3 Data and Expressions

CMPT 125: Lecture 3 Data and Expressions CMPT 125: Lecture 3 Data and Expressions Tamara Smyth, tamaras@cs.sfu.ca School of Computing Science, Simon Fraser University January 3, 2009 1 Character Strings A character string is an object in Java,

More information

CS112 Lecture: Variables, Expressions, Computation, Constants, Numeric Input-Output

CS112 Lecture: Variables, Expressions, Computation, Constants, Numeric Input-Output CS112 Lecture: Variables, Expressions, Computation, Constants, Numeric Input-Output Last revised January 12, 2006 Objectives: 1. To introduce arithmetic operators and expressions 2. To introduce variables

More information

Contents. Jairo Pava COMS W4115 June 28, 2013 LEARN: Language Reference Manual

Contents. Jairo Pava COMS W4115 June 28, 2013 LEARN: Language Reference Manual Jairo Pava COMS W4115 June 28, 2013 LEARN: Language Reference Manual Contents 1 Introduction...2 2 Lexical Conventions...2 3 Types...3 4 Syntax...3 5 Expressions...4 6 Declarations...8 7 Statements...9

More information

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1)

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 2 Professional Program: Data Administration and Management JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) AGENDA

More information

ARG! Language Reference Manual

ARG! Language Reference Manual ARG! Language Reference Manual Ryan Eagan, Mike Goldin, River Keefer, Shivangi Saxena 1. Introduction ARG is a language to be used to make programming a less frustrating experience. It is similar to C

More information

Petros: A Multi-purpose Text File Manipulation Language

Petros: A Multi-purpose Text File Manipulation Language Petros: A Multi-purpose Text File Manipulation Language Language Reference Manual Joseph Sherrick js2778@columbia.edu June 20, 2008 Table of Contents 1 Introduction...................................................

More information

Chapter 2 Working with Data Types and Operators

Chapter 2 Working with Data Types and Operators JavaScript, Fourth Edition 2-1 Chapter 2 Working with Data Types and Operators At a Glance Instructor s Manual Table of Contents Overview Objectives Teaching Tips Quick Quizzes Class Discussion Topics

More information

C Language Part 1 Digital Computer Concept and Practice Copyright 2012 by Jaejin Lee

C Language Part 1 Digital Computer Concept and Practice Copyright 2012 by Jaejin Lee C Language Part 1 (Minor modifications by the instructor) References C for Python Programmers, by Carl Burch, 2011. http://www.toves.org/books/cpy/ The C Programming Language. 2nd ed., Kernighan, Brian,

More information

Expressions and Data Types CSC 121 Spring 2015 Howard Rosenthal

Expressions and Data Types CSC 121 Spring 2015 Howard Rosenthal Expressions and Data Types CSC 121 Spring 2015 Howard Rosenthal Lesson Goals Understand the basic constructs of a Java Program Understand how to use basic identifiers Understand simple Java data types

More information

Department of Computer Science COMP The Programming Competency Test

Department of Computer Science COMP The Programming Competency Test The Australian National University Faculty of Engineering & Information Technology Department of Computer Science COMP1120-2003-01 The Programming Competency Test 1 Introduction The purpose of COMP1120

More information

Review of the C Programming Language for Principles of Operating Systems

Review of the C Programming Language for Principles of Operating Systems Review of the C Programming Language for Principles of Operating Systems Prof. James L. Frankel Harvard University Version of 7:26 PM 4-Sep-2018 Copyright 2018, 2016, 2015 James L. Frankel. All rights

More information

CS4120/4121/5120/5121 Spring 2016 Xi Language Specification Cornell University Version of May 11, 2016

CS4120/4121/5120/5121 Spring 2016 Xi Language Specification Cornell University Version of May 11, 2016 CS4120/4121/5120/5121 Spring 2016 Xi Language Specification Cornell University Version of May 11, 2016 In this course you will start by building a compiler for a language called Xi. This is an imperative,

More information

The Warhol Language Reference Manual

The Warhol Language Reference Manual The Warhol Language Reference Manual Martina Atabong maa2247 Charvinia Neblett cdn2118 Samuel Nnodim son2105 Catherine Wes ciw2109 Sarina Xie sx2166 Introduction Warhol is a functional and imperative programming

More information

SOURCE LANGUAGE DESCRIPTION

SOURCE LANGUAGE DESCRIPTION 1. Simple Integer Language (SIL) SOURCE LANGUAGE DESCRIPTION The language specification given here is informal and gives a lot of flexibility for the designer to write the grammatical specifications to

More information

SMURF Language Reference Manual Serial MUsic Represented as Functions

SMURF Language Reference Manual Serial MUsic Represented as Functions SMURF Language Reference Manual Serial MUsic Represented as Functions Richard Townsend, Lianne Lairmore, Lindsay Neubauer, Van Bui, Kuangya Zhai {rt2515, lel2143, lan2135, vb2363, kz2219}@columbia.edu

More information

CPS122 Lecture: From Python to Java last revised January 4, Objectives:

CPS122 Lecture: From Python to Java last revised January 4, Objectives: Objectives: CPS122 Lecture: From Python to Java last revised January 4, 2017 1. To introduce the notion of a compiled language 2. To introduce the notions of data type and a statically typed language 3.

More information

SKILL AREA 306: DEVELOP AND IMPLEMENT COMPUTER PROGRAMS

SKILL AREA 306: DEVELOP AND IMPLEMENT COMPUTER PROGRAMS Add your company slogan SKILL AREA 306: DEVELOP AND IMPLEMENT COMPUTER PROGRAMS Computer Programming (YPG) LOGO 306.1 Review Selected Programming Environment 306.1.1 Explain the concept of reserve words,

More information

Ruby: Introduction, Basics

Ruby: Introduction, Basics Ruby: Introduction, Basics Computer Science and Engineering College of Engineering The Ohio State University Lecture 4 Ruby vs Java: Similarities Imperative and object-oriented Classes and instances (ie

More information

Ruby: Introduction, Basics

Ruby: Introduction, Basics Ruby: Introduction, Basics Computer Science and Engineering College of Engineering The Ohio State University Lecture 4 Ruby vs Java: Similarities Imperative and object-oriented Classes and instances (ie

More information

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */ Overview Language Basics This chapter describes the basic elements of Rexx. It discusses the simple components that make up the language. These include script structure, elements of the language, operators,

More information

3. Java - Language Constructs I

3. Java - Language Constructs I Educational Objectives 3. Java - Language Constructs I Names and Identifiers, Variables, Assignments, Constants, Datatypes, Operations, Evaluation of Expressions, Type Conversions You know the basic blocks

More information

Objectives. Chapter 2: Basic Elements of C++ Introduction. Objectives (cont d.) A C++ Program (cont d.) A C++ Program

Objectives. Chapter 2: Basic Elements of C++ Introduction. Objectives (cont d.) A C++ Program (cont d.) A C++ Program Objectives Chapter 2: Basic Elements of C++ In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types Discover how a program evaluates

More information

The pixelman Language Reference Manual. Anthony Chan, Teresa Choe, Gabriel Kramer-Garcia, Brian Tsau

The pixelman Language Reference Manual. Anthony Chan, Teresa Choe, Gabriel Kramer-Garcia, Brian Tsau The pixelman Language Reference Manual Anthony Chan, Teresa Choe, Gabriel Kramer-Garcia, Brian Tsau October 2017 Contents 1 Introduction 2 2 Lexical Conventions 2 2.1 Comments..........................................

More information

Chapter 2: Basic Elements of C++

Chapter 2: Basic Elements of C++ Chapter 2: Basic Elements of C++ Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types Discover how a program evaluates

More information

VARIABLES & ASSIGNMENTS

VARIABLES & ASSIGNMENTS Fall 2018 CS150 - Intro to CS I 1 VARIABLES & ASSIGNMENTS Sections 2.1, 2.2, 2.3, 2.4 Fall 2018 CS150 - Intro to CS I 2 Variables Named storage location for holding data named piece of memory You need

More information

Basics of Java Programming

Basics of Java Programming Basics of Java Programming Lecture 2 COP 3252 Summer 2017 May 16, 2017 Components of a Java Program statements - A statement is some action or sequence of actions, given as a command in code. A statement

More information

Chapter 2: Basic Elements of C++ Objectives. Objectives (cont d.) A C++ Program. Introduction

Chapter 2: Basic Elements of C++ Objectives. Objectives (cont d.) A C++ Program. Introduction Chapter 2: Basic Elements of C++ C++ Programming: From Problem Analysis to Program Design, Fifth Edition 1 Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers

More information

egrapher Language Reference Manual

egrapher Language Reference Manual egrapher Language Reference Manual Long Long: ll3078@columbia.edu Xinli Jia: xj2191@columbia.edu Jiefu Ying: jy2799@columbia.edu Linnan Wang: lw2645@columbia.edu Darren Chen: dsc2155@columbia.edu 1. Introduction

More information

Review of the C Programming Language

Review of the C Programming Language Review of the C Programming Language Prof. James L. Frankel Harvard University Version of 11:55 AM 22-Apr-2018 Copyright 2018, 2016, 2015 James L. Frankel. All rights reserved. Reference Manual for the

More information

Full file at

Full file at Java Programming, Fifth Edition 2-1 Chapter 2 Using Data within a Program At a Glance Instructor s Manual Table of Contents Overview Objectives Teaching Tips Quick Quizzes Class Discussion Topics Additional

More information

In Delphi script, when values are assigned to variables, the colon-equal operator is used; :=

In Delphi script, when values are assigned to variables, the colon-equal operator is used; := Statements and Operators Old Content - visit altium.com/documentation Modified by on 13-Sep-2017 Parent page: DelphiScript DelphiScript Statements A statement in DelphiScript is considered as simple when

More information

L-System Fractal Generator: Language Reference Manual

L-System Fractal Generator: Language Reference Manual L-System Fractal Generator: Language Reference Manual Michael Eng, Jervis Muindi, Timothy Sun Contents 1 Program Definition 3 2 Lexical Conventions 3 2.1 Comments...............................................

More information

Sprite an animation manipulation language Language Reference Manual

Sprite an animation manipulation language Language Reference Manual Sprite an animation manipulation language Language Reference Manual Team Leader Dave Smith Team Members Dan Benamy John Morales Monica Ranadive Table of Contents A. Introduction...3 B. Lexical Conventions...3

More information

9/5/2018. Overview. The C Programming Language. Transitioning to C from Python. Why C? Hello, world! Programming in C

9/5/2018. Overview. The C Programming Language. Transitioning to C from Python. Why C? Hello, world! Programming in C Overview The C Programming Language (with material from Dr. Bin Ren, William & Mary Computer Science) Motivation Hello, world! Basic Data Types Variables Arithmetic Operators Relational Operators Assignments

More information

DelphiScript Keywords

DelphiScript Keywords DelphiScript Keywords Old Content - visit altium.com/documentation Modified by on 13-Sep-2017 This reference covers the DelphiScript keywords used for the Scripting System in Altium Designer. The scripting

More information

do fifty two: Language Reference Manual

do fifty two: Language Reference Manual do fifty two: Language Reference Manual Sinclair Target Jayson Ng Josephine Tirtanata Yichi Liu Yunfei Wang 1. Introduction We propose a card game language targeted not at proficient programmers but at

More information

Microsoft Visual Basic 2005: Reloaded

Microsoft Visual Basic 2005: Reloaded Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 3 Variables, Constants, Methods, and Calculations Objectives After studying this chapter, you should be able to: Declare variables and named

More information

The C Programming Language. (with material from Dr. Bin Ren, William & Mary Computer Science)

The C Programming Language. (with material from Dr. Bin Ren, William & Mary Computer Science) The C Programming Language (with material from Dr. Bin Ren, William & Mary Computer Science) 1 Overview Motivation Hello, world! Basic Data Types Variables Arithmetic Operators Relational Operators Assignments

More information

Onion Language Reference Manual. By: Andrew Aday, (aza2112) Amol Kapoor (ajk2227), Jonathan Zhang (jz2814)

Onion Language Reference Manual. By: Andrew Aday, (aza2112) Amol Kapoor (ajk2227), Jonathan Zhang (jz2814) Onion Language Reference Manual By: Andrew Aday, (aza2112) Amol Kapoor (ajk2227), Jonathan Zhang (jz2814) Introduction 3 Types 3 Lexical Conventions 4 Identifiers 4 Keywords 4 Comments 4 Expressions 5

More information

CS112 Lecture: Working with Numbers

CS112 Lecture: Working with Numbers CS112 Lecture: Working with Numbers Last revised January 30, 2008 Objectives: 1. To introduce arithmetic operators and expressions 2. To expand on accessor methods 3. To expand on variables, declarations

More information

Data Types and Variables in C language

Data Types and Variables in C language Data Types and Variables in C language Disclaimer The slides are prepared from various sources. The purpose of the slides is for academic use only Operators in C C supports a rich set of operators. Operators

More information

Java Primer 1: Types, Classes and Operators

Java Primer 1: Types, Classes and Operators Java Primer 1 3/18/14 Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia, and M. H. Goldwasser, Wiley, 2014 Java Primer 1: Types,

More information

JME Language Reference Manual

JME Language Reference Manual JME Language Reference Manual 1 Introduction JME (pronounced jay+me) is a lightweight language that allows programmers to easily perform statistic computations on tabular data as part of data analysis.

More information

Will introduce various operators supported by C language Identify supported operations Present some of terms characterizing operators

Will introduce various operators supported by C language Identify supported operations Present some of terms characterizing operators Operators Overview Will introduce various operators supported by C language Identify supported operations Present some of terms characterizing operators Operands and Operators Mathematical or logical relationships

More information

Chapter 3: Operators, Expressions and Type Conversion

Chapter 3: Operators, Expressions and Type Conversion 101 Chapter 3 Operators, Expressions and Type Conversion Chapter 3: Operators, Expressions and Type Conversion Objectives To use basic arithmetic operators. To use increment and decrement operators. To

More information

1 CS580W-01 Quiz 1 Solution

1 CS580W-01 Quiz 1 Solution 1 CS580W-01 Quiz 1 Solution Date: Wed Sep 26 2018 Max Points: 15 Important Reminder As per the course Academic Honesty Statement, cheating of any kind will minimally result in receiving an F letter grade

More information

Programming for Engineers Introduction to C

Programming for Engineers Introduction to C Programming for Engineers Introduction to C ICEN 200 Spring 2018 Prof. Dola Saha 1 Simple Program 2 Comments // Fig. 2.1: fig02_01.c // A first program in C begin with //, indicating that these two lines

More information

SPARK-PL: Introduction

SPARK-PL: Introduction Alexey Solovyev Abstract All basic elements of SPARK-PL are introduced. Table of Contents 1. Introduction to SPARK-PL... 1 2. Alphabet of SPARK-PL... 3 3. Types and variables... 3 4. SPARK-PL basic commands...

More information

Expressions and Data Types CSC 121 Fall 2015 Howard Rosenthal

Expressions and Data Types CSC 121 Fall 2015 Howard Rosenthal Expressions and Data Types CSC 121 Fall 2015 Howard Rosenthal Lesson Goals Understand the basic constructs of a Java Program Understand how to use basic identifiers Understand simple Java data types and

More information

Java+- Language Reference Manual

Java+- Language Reference Manual Fall 2016 COMS4115 Programming Languages & Translators Java+- Language Reference Manual Authors Ashley Daguanno (ad3079) - Manager Anna Wen (aw2802) - Tester Tin Nilar Hlaing (th2520) - Systems Architect

More information

A Fast Review of C Essentials Part I

A Fast Review of C Essentials Part I A Fast Review of C Essentials Part I Structural Programming by Z. Cihan TAYSI Outline Program development C Essentials Functions Variables & constants Names Formatting Comments Preprocessor Data types

More information

X Language Definition

X Language Definition X Language Definition David May: November 1, 2016 The X Language X is a simple sequential programming language. It is easy to compile and an X compiler written in X is available to simplify porting between

More information

Review: Exam 1. Your First C++ Program. Declaration Statements. Tells the compiler. Examples of declaration statements

Review: Exam 1. Your First C++ Program. Declaration Statements. Tells the compiler. Examples of declaration statements Review: Exam 1 9/20/06 CS150 Introduction to Computer Science 1 1 Your First C++ Program 1 //*********************************************************** 2 // File name: hello.cpp 3 // Author: Shereen Khoja

More information

Microsoft Visual Basic 2015: Reloaded

Microsoft Visual Basic 2015: Reloaded Microsoft Visual Basic 2015: Reloaded Sixth Edition Chapter Three Memory Locations and Calculations Objectives After studying this chapter, you should be able to: Declare variables and named constants

More information

DaMPL. Language Reference Manual. Henrique Grando

DaMPL. Language Reference Manual. Henrique Grando DaMPL Language Reference Manual Bernardo Abreu Felipe Rocha Henrique Grando Hugo Sousa bd2440 flt2107 hp2409 ha2398 Contents 1. Getting Started... 4 2. Syntax Notations... 4 3. Lexical Conventions... 4

More information

Chapter 2. Lexical Elements & Operators

Chapter 2. Lexical Elements & Operators Chapter 2. Lexical Elements & Operators Byoung-Tak Zhang TA: Hanock Kwak Biointelligence Laboratory School of Computer Science and Engineering Seoul National Univertisy http://bi.snu.ac.kr The C System

More information

IPCoreL. Phillip Duane Douglas, Jr. 11/3/2010

IPCoreL. Phillip Duane Douglas, Jr. 11/3/2010 IPCoreL Programming Language Reference Manual Phillip Duane Douglas, Jr. 11/3/2010 The IPCoreL Programming Language Reference Manual provides concise information about the grammar, syntax, semantics, and

More information

Operators. Java operators are classified into three categories:

Operators. Java operators are classified into three categories: Operators Operators are symbols that perform arithmetic and logical operations on operands and provide a meaningful result. Operands are data values (variables or constants) which are involved in operations.

More information

An Interactive Desk Calculator. Project P2 of. Common Lisp: An Interactive Approach. Stuart C. Shapiro. Department of Computer Science

An Interactive Desk Calculator. Project P2 of. Common Lisp: An Interactive Approach. Stuart C. Shapiro. Department of Computer Science An Interactive Desk Calculator Project P2 of Common Lisp: An Interactive Approach Stuart C. Shapiro Department of Computer Science State University of New York at Bualo January 25, 1996 The goal of this

More information

9/21/17. Outline. Expression Evaluation and Control Flow. Arithmetic Expressions. Operators. Operators. Notation & Placement

9/21/17. Outline. Expression Evaluation and Control Flow. Arithmetic Expressions. Operators. Operators. Notation & Placement Outline Expression Evaluation and Control Flow In Text: Chapter 6 Notation Operator evaluation order Operand evaluation order Overloaded operators Type conversions Short-circuit evaluation of conditions

More information

CS112 Lecture: Primitive Types, Operators, Strings

CS112 Lecture: Primitive Types, Operators, Strings CS112 Lecture: Primitive Types, Operators, Strings Last revised 1/24/06 Objectives: 1. To explain the fundamental distinction between primitive types and reference types, and to introduce the Java primitive

More information

CHIL CSS HTML Integrated Language

CHIL CSS HTML Integrated Language CHIL CSS HTML Integrated Language Programming Languages and Translators Fall 2013 Authors: Gil Chen Zion gc2466 Ami Kumar ak3284 Annania Melaku amm2324 Isaac White iaw2105 Professor: Prof. Stephen A. Edwards

More information

REVIEW. The C++ Programming Language. CS 151 Review #2

REVIEW. The C++ Programming Language. CS 151 Review #2 REVIEW The C++ Programming Language Computer programming courses generally concentrate on program design that can be applied to any number of programming languages on the market. It is imperative, however,

More information

Scheme of work Cambridge International AS & A Level Computing (9691)

Scheme of work Cambridge International AS & A Level Computing (9691) Scheme of work Cambridge International AS & A Level Computing (9691) Unit 2: Practical programming techniques Recommended prior knowledge Students beginning this course are not expected to have studied

More information

CS113: Lecture 3. Topics: Variables. Data types. Arithmetic and Bitwise Operators. Order of Evaluation

CS113: Lecture 3. Topics: Variables. Data types. Arithmetic and Bitwise Operators. Order of Evaluation CS113: Lecture 3 Topics: Variables Data types Arithmetic and Bitwise Operators Order of Evaluation 1 Variables Names of variables: Composed of letters, digits, and the underscore ( ) character. (NO spaces;

More information

XPath Expression Syntax

XPath Expression Syntax XPath Expression Syntax SAXON home page Contents Introduction Constants Variable References Parentheses and operator precedence String Expressions Boolean Expressions Numeric Expressions NodeSet expressions

More information

Ordinary Differential Equation Solver Language (ODESL) Reference Manual

Ordinary Differential Equation Solver Language (ODESL) Reference Manual Ordinary Differential Equation Solver Language (ODESL) Reference Manual Rui Chen 11/03/2010 1. Introduction ODESL is a computer language specifically designed to solve ordinary differential equations (ODE

More information

CS /534 Compiler Construction University of Massachusetts Lowell. NOTHING: A Language for Practice Implementation

CS /534 Compiler Construction University of Massachusetts Lowell. NOTHING: A Language for Practice Implementation CS 91.406/534 Compiler Construction University of Massachusetts Lowell Professor Li Xu Fall 2004 NOTHING: A Language for Practice Implementation 1 Introduction NOTHING is a programming language designed

More information

The Compositional C++ Language. Denition. Abstract. This document gives a concise denition of the syntax and semantics

The Compositional C++ Language. Denition. Abstract. This document gives a concise denition of the syntax and semantics The Compositional C++ Language Denition Peter Carlin Mani Chandy Carl Kesselman March 12, 1993 Revision 0.95 3/12/93, Comments welcome. Abstract This document gives a concise denition of the syntax and

More information

DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6)

DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6) Technology & Information Management Instructor: Michael Kremer, Ph.D. Database Program: Microsoft Access Series DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6) AGENDA 3. Executing VBA

More information

Decaf Language Reference Manual

Decaf Language Reference Manual Decaf Language Reference Manual C. R. Ramakrishnan Department of Computer Science SUNY at Stony Brook Stony Brook, NY 11794-4400 cram@cs.stonybrook.edu February 12, 2012 Decaf is a small object oriented

More information

IC Language Specification

IC Language Specification CS 301 Spring 2016 IC Language Specification The IC Language For the implementation project, you will build a compiler for an object-oriented language called IC (for Irish Coffee 1 ), which is essentially

More information

TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA

TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA 1 TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach by M. Guzdial and B. Ericson, and instructor materials prepared

More information

MATVEC: MATRIX-VECTOR COMPUTATION LANGUAGE REFERENCE MANUAL. John C. Murphy jcm2105 Programming Languages and Translators Professor Stephen Edwards

MATVEC: MATRIX-VECTOR COMPUTATION LANGUAGE REFERENCE MANUAL. John C. Murphy jcm2105 Programming Languages and Translators Professor Stephen Edwards MATVEC: MATRIX-VECTOR COMPUTATION LANGUAGE REFERENCE MANUAL John C. Murphy jcm2105 Programming Languages and Translators Professor Stephen Edwards Language Reference Manual Introduction The purpose of

More information

SSOL Language Reference Manual

SSOL Language Reference Manual SSOL Language Reference Manual Madeleine Tipp Jeevan Farias Daniel Mesko mrt2148 jtf2126 dpm2153 Manager Language Guru System Architect October 15, 2018 Contents 1 Lexical Conventions 2 1.1 Identifiers...............................................

More information

Computers Programming Course 5. Iulian Năstac

Computers Programming Course 5. Iulian Năstac Computers Programming Course 5 Iulian Năstac Recap from previous course Classification of the programming languages High level (Ada, Pascal, Fortran, etc.) programming languages with strong abstraction

More information

XQ: An XML Query Language Language Reference Manual

XQ: An XML Query Language Language Reference Manual XQ: An XML Query Language Language Reference Manual Kin Ng kn2006@columbia.edu 1. Introduction XQ is a query language for XML documents. This language enables programmers to express queries in a few simple

More information

Data and Variables. Data Types Expressions. String Concatenation Variables Declaration Assignment Shorthand operators. Operators Precedence

Data and Variables. Data Types Expressions. String Concatenation Variables Declaration Assignment Shorthand operators. Operators Precedence Data and Variables Data Types Expressions Operators Precedence String Concatenation Variables Declaration Assignment Shorthand operators Review class All code in a java file is written in a class public

More information

VENTURE. Section 1. Lexical Elements. 1.1 Identifiers. 1.2 Keywords. 1.3 Literals

VENTURE. Section 1. Lexical Elements. 1.1 Identifiers. 1.2 Keywords. 1.3 Literals VENTURE COMS 4115 - Language Reference Manual Zach Adler (zpa2001), Ben Carlin (bc2620), Naina Sahrawat (ns3001), James Sands (js4597) Section 1. Lexical Elements 1.1 Identifiers An identifier in VENTURE

More information

The Arithmetic Operators. Unary Operators. Relational Operators. Examples of use of ++ and

The Arithmetic Operators. Unary Operators. Relational Operators. Examples of use of ++ and The Arithmetic Operators The arithmetic operators refer to the standard mathematical operators: addition, subtraction, multiplication, division and modulus. Op. Use Description + x + y adds x and y x y

More information

The Arithmetic Operators

The Arithmetic Operators The Arithmetic Operators The arithmetic operators refer to the standard mathematical operators: addition, subtraction, multiplication, division and modulus. Examples: Op. Use Description + x + y adds x

More information