Perl Notes

Total Page:16

File Type:pdf, Size:1020Kb

Perl Notes Perl notes Curro Pérez Bernal <[email protected]> $Id: perl_notes.sgml,v 1.3 2011/12/12 15:41:58 curro Exp curro $ Abstract Short notes for an introduction to Perl based on R.L. Schwartz et al. Learning Perl (See refer- ences). Copyright Notice Copyright © 2011 by Curro Perez-Bernal <[email protected]> This document may used under the terms of the GNU General Public License version 3 or higher. (http://www.gnu.org/copyleft/gpl.html) i Contents 1 Scalar Data 1 1.1 Numbers..........................................1 1.1.1 Numeric Operators................................2 1.2 Strings...........................................2 1.2.1 String Operators.................................3 1.3 Scalar Variables......................................3 1.4 Basic Output with print ................................4 1.5 Operator Associativity and Precedence........................5 1.6 The if Control Structure.................................6 1.6.1 Comparison Operators..............................6 1.6.2 Using the if Control Structure.........................6 1.7 Getting User Input....................................7 1.8 The while Control Structure..............................8 1.9 The undef Value.....................................8 2 Lists and Arrays9 2.1 Defining and Accessing an Array............................9 2.1.1 List Literals.................................... 10 2.2 List Assignment...................................... 11 2.3 Interpolating Arrays................................... 11 2.4 Array Operators...................................... 12 2.4.1 Operators pop and push ............................ 12 2.4.2 Operators shift and unshift ........................ 12 2.4.3 The splice Operator.............................. 12 CONTENTS ii 2.4.4 The reverse Operator............................. 13 2.4.5 The sort Operator................................ 13 2.4.6 The each Operator................................ 13 2.4.7 Array clearing................................... 13 2.5 The foreach control structure............................. 14 2.5.1 Perl’s default scalar variable $_........................ 14 2.6 Scalar and List context.................................. 15 2.6.1 List-producing expressions in scalar context.................. 15 2.6.2 Scalar-producing expressions in list context.................. 16 2.6.3 STDIN in list context................................ 16 3 References 17 1 Chapter 1 Scalar Data The simplest kind of data in Perl are scalar data, that can be mostly numbers or strings of characters. 1.1 Numbers Both integers and floating-point numbers have an internal double-precision floating point rep- resentation. Examples of floating-point literals1 • 1.24 • 255.005 • 5.235E45 • -25.0E-11 • 251.0 • -1.9221 Examples of integer literals • 24 • 5 • 0 • -45 1A literal is how a particular value is represented in Perl. Chapter 1. Scalar Data 2 • -2501 • 19221 • 2519988585883 • 2_519_988_585_883 1.1.1 Numeric Operators • 2 + 4 • 5.6 - 34.4447 • 4.5 * 4 • -4 / 3 • 55.5 / 3 • 75 % 2 • 70 % 3 1.2 Strings Strings are character sequences that may contain any possible compination of characters. We may differentiate between single- and double-quoted string literals. Single-Quoted ’Markus’ ’Lena’ ’’ ’Shannon’ ’let\’s include an apostrophe!’ ’and a backslash: \\’ ’a backslash and n: \n’ Double-Quoted In this case the backslash is used to specify certain control characters. "Barbara" "Ana" "Hello Karen!\n" "Black\tWhile" Chapter 1. Scalar Data 3 The most important string backslash escapes are the following \a Beep \b Backspace \c "Control" caracter. \cD = CTRL-D \e Escape \f Form feed \l Make the next letter lowercase \n New line, return. \r Carriage return. \t Tab. \u Make the next letter uppercase \x Enables hex numbers \v Vertical tab \\ Print backslash \" Print double quotes \ Escape next character if known otherwise print. Also allows octal numbers. \L Make all letters lowercase until the \E \U Make all letters uppercase until the \E \Q Add a backslash-quote to all the nonalphanumerics until the \E \E Terminates the effects of \L, \U, or \Q \007 Any octal ASCII value \x7f Any hexadecimal value \cx Control-x 1.2.1 String Operators • “hello”.“world” • “GNU”.“/”.“Linux” • “This is”.“ ”.“a sentence.\n” • “Tuxie ” x 5 • 70 x 3 Perl performs the conversion between numbers and strings when it is necessary. 1.3 Scalar Variables Variables holding exactly one value that start with a $ (named the sigil) followed by a Perl identifier. All the variables that follow are different Chapter 1. Scalar Data 4 $hello $Hello $HELLO $Starting_Value $quite_long_variable_name It is important to select meaningful variable names, making use of underscores when possible2. The Perl assignment operator is the equals sign that takes a variable name in the left side that takes the value of the expression on the right. $hello = 5; $Hello = 4.33; $HELLO = "Good morning!\n"; $Starting_Value = $index - 3; $quite_long_variable_name = $x * 2; Binary assigments are shortcuts like the following $a = $a + 3; $a += 3; $a = $a * 3; $a *= 3; $string = $string." "; $string .= " "; 1.4 Basic Output with print print "This is a message for you.\n"; print "This is "; print "a message for you."; print "\n"; print "This is ", "a message for you."; print "The solution is ", 2*3.125,"\n"; Scalar variables in doubly-quoted string literals are subject to variable interpolation 2More valuable advices in the Perlstyle documentation. Chapter 1. Scalar Data 5 $op_sys = "GNU/Linux"; print "One of the best operating systems is $op_sys\n"; To print the dollar sign it has to be escaped or between single quotes print "The \$op_sys variable value is $op_sys\n"; print ’The \$op_sys variable value ’, "is $op_sys\n"; The variable name can be located between curly braces to prevent errors delimiting variable names $job = "student"; print "The book\’s owner is an $student\n"; print "This is the favourite bar of the college ${job}s\n"; 1.5 Operator Associativity and Precedence From the perlop documentation. Associativity Precedence (highest to lowest) left terms and list operators (leftward) left -> nonassoc ++ -- right ** right ! ~ \ and unary + and - left =~ !~ left * / % x left + - . left << >> nonassoc named unary operators nonassoc < > <= >= lt gt le ge nonassoc == != <=> eq ne cmp ~~ left & left | ^ left && left || // nonassoc .. ... right ?: right = += -= *= etc. left , => nonassoc list operators (rightward) right not left and left or xor Chapter 1. Scalar Data 6 In case of doubt: use parenthesis. 1.6 The if Control Structure 1.6.1 Comparison Operators Comparison operators return a true or false value and are the following Equal, numeric == Equal, string eq Not Equal, numeric != Not Equal, string ne Less than, numeric < Less than, string lt Less than or equal, numeric <=; Less than or equal, string leq Greater than, numeric > Greater than, string gt Greater than or equal, numeric >=; Greater than or equal, string geq Comparison, numeric <=> Comparison, string comp The unary not operator (!) give the opposite value of any Boolean value. 1.6.2 Using the if Control Structure The if control structure defines a block that only executed if its associated condition returns a true value if ($name gt "Monika") { print "’$name’ is after ’Monika’ in sort order\n"; } Chapter 1. Scalar Data 7 The keyword else allows an alternative choice if ($name gt "Monika") { print "’$name’ is after ’Monika’ in sort order\n"; } else { print "’$name’ is before ’Monika’ in sort order\n"; } You may use any scalar value in the conditional $value_1 = 10.0; $value_2 = 2; $check = $value_1 > $value_2; if ($check) { print "\$value_1 is larger than \$value_2\n"; } The rules for deciding if a value is true or false are the following: • All numbers are true except 0 (zero). • All strings are true besides the empty string (”). • All other cases are converted to a number or a string and the previous rules apply. 1.7 Getting User Input The simplest way to get a value from the keyboard into the program is the line-input operator, <STDIN>. Every time a program finds an <STDIN> where a scalar value is expected, Perl reads the next complete line from the standard input. The newline character at the end of the line can be removed using the chomp operator. $value_1 = 10.0; $value_2 = <STDIN>; print "\$value_2 = $value_2\n"; chomp($value_2); # newline is removed print "\$value_2 = $value_2\n"; $check = $value_1 > $value_2; if ($check) { print "\$value_1 is larger than \$value_2\n"; } This can be done in a single step Chapter 1. Scalar Data 8 $value_1 = 10.0; chomp($value_2 = <STDIN>); print "\$value_2 = $value_2\n"; $check = $value_1 > $value_2; if ($check) { print "\$value_1 is larger than \$value_2\n"; } 1.8 The while Control Structure This is one of the possible control structures in Perl. It repeats a block of code as long as a given condition is accomplished: $counter = 10; while ($counter > 0) { print "\$counter = $counter\n"; $counter -= 2; } The conditional is evaluated prior to the first iteration, thus it is possible that the block is not executed a single time if the condition is initially false. 1.9 The undef Value Values used before being assigned take the special value undef. If it is expected to take a numerical value then the assigned value is zero, while in a string value the variable takes the empty string value. This is a standard behavior, though Perl will usally warn the user when unusual uses of the undef value occur. 9 Chapter 2 Lists and Arrays A list is defined as an ordered collection of scalars, and an
Recommended publications
  • THE MEANING of “EQUALS” Charles Darr Take a Look at the Following Mathematics Problem
    PROFESSIONAL DEVELOPMENT THE MEANING OF “EQUALS” Charles Darr Take a look at the following mathematics problem. has been explored by mathematics education researchers internationally (Falkner, Levi and Carpenter, 1999; Kieran, 1981, 1992; MacGregor Write the number in the square below that you think and Stacey, 1997; Saenz-Ludlow and Walgamuth, 1998; Stacey and best completes the equation. MacGregor, 1999; Wright, 1999). However, the fact that so many students appear to have this 4 + 5 = + 3 misconception highlights some important considerations that we, as mathematics educators, can learn from and begin to address. How difficult do you consider this equation to be? At what age do you In what follows I look at two of these considerations. I then go on to think a student should be able to complete it correctly? discuss some strategies we can employ in the classroom to help our I recently presented this problem to over 300 Year 7 and 8 students at students gain a richer sense of what the equals sign represents. a large intermediate school. More than half answered it incorrectly.1 Moreover, the vast majority of the students who wrote something other The meaning of “equals” than 6 were inclined to write the missing number as “9”. Firstly, it is worth considering what the equals sign means in a This result is not just an intermediate school phenomenon, however. mathematical sense, and why so many children seem to struggle to Smaller numbers of students in other Years were also tested. In Years 4, develop this understanding. 5 and 6, even larger percentages wrote incorrect responses, while at Years From a mathematical point of view, the equals sign is not a command 9 and 10, more than 20 percent of the students were still not writing a to do something.
    [Show full text]
  • It's the Symbol You Put Before the Answer
    It’s the symbol you put before the answer Laura Swithinbank discovers that pupils often ‘see’ things differently “It’s the symbol you put before the answer.” 3. A focus on both representing and solving a problem rather than on merely solving it; ave you ever heard a pupil say this in response to being asked what the equals sign is? Having 4. A focus on both numbers and letters, rather than H heard this on more than one occasion in my on numbers alone (…) school, I carried out a brief investigation with 161 pupils, 5. A refocusing of the meaning of the equals sign. Year 3 to Year 6, in order to find out more about the way (Kieran, 2004:140-141) pupils interpret the equals sign. The response above was common however, what really interested me was the Whilst reflecting on the Kieran summary, some elements variety of other answers I received. Essentially, it was immediately struck a chord with me with regard to my own clear that pupils did not have a consistent understanding school context, particularly the concept of ‘refocusing the of the equals sign across the school. This finding spurred meaning of the equals sign’. The investigation I carried me on to consider how I presented the equals sign to my out clearly echoed points raised by Kieran. For example, pupils, and to deliberate on the following questions: when asked to explain the meaning of the ‘=’ sign, pupils at my school offered a wide range of answers including: • How can we define the equals sign? ‘the symbol you put before the answer’; ‘the total of the • What are the key issues and misconceptions with number’; ‘the amount’; ‘altogether’; ‘makes’; and ‘you regard to the equals sign in primary mathematics? reveal the answer after you’ve done the maths question’.
    [Show full text]
  • Perl II Operators, Truth, Control Structures, Functions, and Processing the Command Line
    Perl II Operators, truth, control structures, functions, and processing the command line Dave Messina v3 2012 1 Math 1 + 2 = 3 # kindergarten x = 1 + 2 # algebra my $x = 1 + 2; # Perl What are the differences between the algebra version and the Perl version? 2 Math my $x = 5; my $y = 2; my $z = $x + $y; 3 Math my $sum = $x + $y; my $difference = $x - $y; my $product = $x * $y; my $quotient = $x / $y; my $remainder = $x % $y; 4 Math my $x = 5; my $y = 2; my $sum = $x + $y; my $product = $x - $y; Variable names are arbitrary. Pick good ones! 5 What are these called? my $sum = $x + $y; my $difference = $x - $y; my $product = $x * $y; my $quotient = $x / $y; my $remainder = $x % $y; 6 Numeric operators Operator Meaning + add 2 numbers - subtract left number from right number * multiply 2 numbers / divide left number from right number % divide left from right and take remainder take left number to the power ** of the right number 7 Numeric comparison operators Operator Meaning < Is left number smaller than right number? > Is left number bigger than right number? <= Is left number smaller or equal to right? >= Is left number bigger or equal to right? == Is left number equal to right number? != Is left number not equal to right number? Why == ? 8 Comparison operators are yes or no questions or, put another way, true or false questions True or false: > Is left number larger than right number? 2 > 1 # true 1 > 3 # false 9 Comparison operators are true or false questions 5 > 3 -1 <= 4 5 == 5 7 != 4 10 What is truth? 0 the number 0 is false "0"
    [Show full text]
  • Unicode Compression: Does Size Really Matter? TR CS-2002-11
    Unicode Compression: Does Size Really Matter? TR CS-2002-11 Steve Atkin IBM Globalization Center of Competency International Business Machines Austin, Texas USA 78758 [email protected] Ryan Stansifer Department of Computer Sciences Florida Institute of Technology Melbourne, Florida USA 32901 [email protected] July 2003 Abstract The Unicode standard provides several algorithms, techniques, and strategies for assigning, transmitting, and compressing Unicode characters. These techniques allow Unicode data to be represented in a concise format in several contexts. In this paper we examine several techniques and strategies for compressing Unicode data using the programs gzip and bzip. Unicode compression algorithms known as SCSU and BOCU are also examined. As far as size is concerned, algorithms designed specifically for Unicode may not be necessary. 1 Introduction Characters these days are more than one 8-bit byte. Hence, many are concerned about the space text files use, even in an age of cheap storage. Will storing and transmitting Unicode [18] take a lot more space? In this paper we ask how compression affects Unicode and how Unicode affects compression. 1 Unicode is used to encode natural-language text as opposed to programs or binary data. Just what is natural-language text? The question seems simple, yet there are complications. In the information age we are accustomed to discretization of all kinds: music with, for instance, MP3; and pictures with, for instance, JPG. Also, a vast amount of text is stored and transmitted digitally. Yet discretizing text is not generally considered much of a problem. This may be because the En- glish language, western society, and computer technology all evolved relatively smoothly together.
    [Show full text]
  • Programming Basics
    Readings and References • Reading » Fluency with Information Technology Programming Basics • Chapter 18, Fundamental Concepts Expressed in JavaScript • Other References INFO/CSE 100, Autumn 2004 » Games and Puzzles Fluency in Information Technology • Thomas Jefferson National Accelerator Facility, Office of Science Education http://www.cs.washington.edu/100 • http://education.jlab.org/indexpages/elementgames.html 25-Oct-2004 cse100-11-programming © 2004 University of Washington 1 25-Oct-2004 cse100-11-programming © 2004 University of Washington 2 The Plan Begin with HTML • We will learn JavaScript over the next few Basic HTML is static lectures the contents of the file are displayed as given • JavaScript is used with HTML in Web pages <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" • JavaScript is a contemporary programming language -- "http://www.w3.org/TR/html4/loose.dtd"> we will learn only its basics <html> <head> • You will program in a text editor and run your program <title>Simple A</title> </head> with your browser <body> What is 2.0 + 2.0? </body> </html> JavaScript is a way to make HTML “dynamic” 25-Oct-2004 cse100-11-programming © 2004 University of Washington 3 25-Oct-2004 cse100-11-programming © 2004 University of Washington 4 Add some “dynamic” content JavaScript in an HTML page Scripting languages let us create active pages » implement actions to be taken at run-time when the page is <script> block loaded or in response to user event in <head> <head> <title>Simple B</title> Language we are javascript <head>
    [Show full text]
  • UEB Guidelines for Technical Material
    Guidelines for Technical Material Unified English Braille Guidelines for Technical Material This version updated October 2008 ii Last updated October 2008 iii About this Document This document has been produced by the Maths Focus Group, a subgroup of the UEB Rules Committee within the International Council on English Braille (ICEB). At the ICEB General Assembly in April 2008 it was agreed that the document should be released for use internationally, and that feedback should be gathered with a view to a producing a new edition prior to the 2012 General Assembly. The purpose of this document is to give transcribers enough information and examples to produce Maths, Science and Computer notation in Unified English Braille. This document is available in the following file formats: pdf, doc or brf. These files can be sourced through the ICEB representatives on your local Braille Authorities. Please send feedback on this document to ICEB, again through the Braille Authority in your own country. Last updated October 2008 iv Guidelines for Technical Material 1 General Principles..............................................................................................1 1.1 Spacing .......................................................................................................1 1.2 Underlying rules for numbers and letters.....................................................2 1.3 Print Symbols ..............................................................................................3 1.4 Format.........................................................................................................3
    [Show full text]
  • Using Regex to Parse Attribute-Value Pairs in a Macro Variable Rowland Hale, Syneos Health
    PharmaSUG 2021 - Paper QT-134 Using Regex to Parse Attribute-Value Pairs in a Macro Variable Rowland Hale, Syneos Health ABSTRACT In some circumstances it may be deemed preferable to pass multiple values to a macro not via multiple parameters but via a list of attribute-value pairs in a single parameter. Parsing more complex parameter values such as these may seem daunting at first, but regular expressions help us make light of the task! This paper explains how to use the PRXPARSE, PRXMATCH and the lesser known PRXPOSN regular expression functions in SAS® to extract in robust fashion the values we need from such a list. The paper is aimed at those who wish to expand on a basic knowledge of regular expressions, and although the functions are applied and explained within a specific practical context, the knowledge gained will have much potential for wider use in your daily programming work. INTRODUCTION The author occasionally comes across seasoned and capable SAS programmers who haven’t taken the plunge into the powerful world of regular expressions. Not so surprising, given that regular expressions look, well, downright scary, don’t they? For sure, regex patterns can appear complex, but, on the other hand, when you see a series of three (or more!) “normal” (i.e. non regex) string handling functions, all mind-bogglingly nested on a single line of code (and, if in a macro context, each further buried inside a %SYSFUNC macro function) and realise that this can all be replaced with a relatively simple regular expression, you may start to wonder which is the easier to deal with.
    [Show full text]
  • From an Operational to a Relational Conception of the Equal Sign. Thirds Graders’ Developing Algebraic Thinking
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Funes Molina, M. & Ambrose, R. (2008). From an operational to a relational conception of the equal sign. Thirds graders’ developing algebraic thinking. Focus on Learning Problems in Mathematics, 30(1), 61-80. From an Operational to a Relational Conception of the Equal Sign. Third Graders’ Developing Algebraic Thinking Molina, M. & Ambrose, R. Abstract We describe a teaching experiment about third grade students´ understanding of the equal sign and their initial forays into analyzing expressions. We used true/false and open number sentences in forms unfamiliar to the students to cause students to reconsider their conceptions of the equal sign. Our results suggest a sequence of three stages in the evolution of students’ understanding of the equal sign with students progressing from a procedural/computational perspective to an analytic perspective. Our data show that as students deepened their conceptions about the equal sign they began to analyze expressions in ways that promoted algebraic thinking. We describe the essential elements of instruction that advanced this learning. KEYWORDS: Algebraic thinking, Analyzing expressions, Arithmetic equations, Early- Algebra, Equal sign, Number sentences, Relational thinking. As algebra has taken a more prominent role in mathematics education, many are advocating introducing children to it in primary school (e.g., Carraher, Schliemann, Brizuela, & Earnest, 2006; Kaput, 2000; National Council of Teacher of Mathematics, 2000), and open number sentences can be a good context to address this goal. Students are frequently introduced to equations by considering number sentences with an unknown where a figure or a line is used instead of a variable, as in _+ 4 = 5 +7 (Radford, 2000).
    [Show full text]
  • The C Programming Language
    The C programming Language By Brian W. Kernighan and Dennis M. Ritchie. Published by Prentice-Hall in 1988 ISBN 0-13-110362-8 (paperback) ISBN 0-13-110370-9 Contents Preface Preface to the first edition Introduction 1. Chapter 1: A Tutorial Introduction 1. Getting Started 2. Variables and Arithmetic Expressions 3. The for statement 4. Symbolic Constants 5. Character Input and Output 1. File Copying 2. Character Counting 3. Line Counting 4. Word Counting 6. Arrays 7. Functions 8. Arguments - Call by Value 9. Character Arrays 10. External Variables and Scope 2. Chapter 2: Types, Operators and Expressions 1. Variable Names 2. Data Types and Sizes 3. Constants 4. Declarations 5. Arithmetic Operators 6. Relational and Logical Operators 7. Type Conversions 8. Increment and Decrement Operators 9. Bitwise Operators 10. Assignment Operators and Expressions 11. Conditional Expressions 12. Precedence and Order of Evaluation 3. Chapter 3: Control Flow 1. Statements and Blocks 2. If-Else 3. Else-If 4. Switch 5. Loops - While and For 6. Loops - Do-While 7. Break and Continue 8. Goto and labels 4. Chapter 4: Functions and Program Structure 1. Basics of Functions 2. Functions Returning Non-integers 3. External Variables 4. Scope Rules 5. Header Files 6. Static Variables 7. Register Variables 8. Block Structure 9. Initialization 10. Recursion 11. The C Preprocessor 1. File Inclusion 2. Macro Substitution 3. Conditional Inclusion 5. Chapter 5: Pointers and Arrays 1. Pointers and Addresses 2. Pointers and Function Arguments 3. Pointers and Arrays 4. Address Arithmetic 5. Character Pointers and Functions 6. Pointer Arrays; Pointers to Pointers 7.
    [Show full text]
  • CSCE 120: Learning to Code Manipulating Data I
    CSCE 120: Learning To Code Manipulating Data I Introduction This module is designed to get you started working with data by understanding and using variables and data types in JavaScript. It will also introduce you to basic operators and familiarize you with basic syntax and coding style. Variables Previously, we worked with data represented using JSON. JSON is actually a subset of the programming language JavaScript. In the full JavaScript, data is not merely static, it is dynamic. That is, data can be accessed, changed, moved around etc. The first mechanism for working with data is a variable. A variable in a programming language is much like a variable in algebra: it has a name (formally called an identifier) and can be assigned a value. This is very similar to how we worked with JSON data using key-value pairs. With variables, the variable name acts as a key while it can be assigned a value. Variable Declaration, Naming In JavaScript, you can create a variable using the keyword var and then providing a name for the variable. There are a few simple rules that must be followed when you name a variable. 1. Variable names can include letters (upper or lowercase), digits, and underscores (no spaces are allowed) 2. Variable names must begin with a letter (upper or lower case)1 1Variable names can also begin with $ or _ but this is discouraged as we'll see later. 1 3. Variable names are case sensitive so total , Total and TOTAL are three different variables 4. The JavaScript language has several reserved words that are used by the language itself and cannot be used for variable names 5.
    [Show full text]
  • Students' Early Grade Understanding of the Equal Sign and Non
    www.ijres.net Students’ Early Grade Understanding of the Equal Sign and Non-standard Equations in Jordan and India Melinda S. Eichhorn1, Lindsey E. Perry2, Aarnout Brombacher3 1Gordon College 2Southern Methodist University 3Brombacher and Associates ISSN: 2148-9955 To cite this article: Eichhorn, M.S., Perry, L.E., & Brombacher, A. (2018). Students’ early grade understanding of the equal sign and non-standard equations in Jordan and India. International Journal of Research in Education and Science (IJRES), 4(2), 655-669. DOI:10.21890/ijres.432520 This article may be used for research, teaching, and private study purposes. Any substantial or systematic reproduction, redistribution, reselling, loan, sub-licensing, systematic supply, or distribution in any form to anyone is expressly forbidden. Authors alone are responsible for the contents of their articles. The journal owns the copyright of the articles. The publisher shall not be liable for any loss, actions, claims, proceedings, demand, or costs or damages whatsoever or howsoever caused arising directly or indirectly in connection with or arising out of the use of the research material. International Journal of Research in Education and Science Volume 4, Issue 2, Summer 2018 DOI:10.21890/ijres.432520 Students’ Early Grade Understanding of the Equal Sign and Non-standard Equations in Jordan and India Melinda S. Eichhorn, Lindsey E. Perry, Aarnout Brombacher Article Info Abstract Article History Many students around the world are exposed to a rote teaching style in mathematics that emphasizes memorization of procedures. Students are Received: frequently presented with standard types of equations in their textbooks, in which 15 January 2018 the equal sign is immediately preceding the answer (a + b = c).
    [Show full text]
  • Unicode Characters in Proofpower Through Lualatex
    Unicode Characters in ProofPower through Lualatex Roger Bishop Jones Abstract This document serves to establish what characters render like in utf8 ProofPower documents prepared using lualatex. Created 2019 http://www.rbjones.com/rbjpub/pp/doc/t055.pdf © Roger Bishop Jones; Licenced under Gnu LGPL Contents 1 Prelude 2 2 Changes 2 2.1 Recent Changes .......................................... 2 2.2 Changes Under Consideration ................................... 2 2.3 Issues ............................................... 2 3 Introduction 3 4 Mathematical operators and symbols in Unicode 3 5 Dedicated blocks 3 5.1 Mathematical Operators block .................................. 3 5.2 Supplemental Mathematical Operators block ........................... 4 5.3 Mathematical Alphanumeric Symbols block ........................... 4 5.4 Letterlike Symbols block ..................................... 6 5.5 Miscellaneous Mathematical Symbols-A block .......................... 7 5.6 Miscellaneous Mathematical Symbols-B block .......................... 7 5.7 Miscellaneous Technical block .................................. 7 5.8 Geometric Shapes block ...................................... 8 5.9 Miscellaneous Symbols and Arrows block ............................. 9 5.10 Arrows block ........................................... 9 5.11 Supplemental Arrows-A block .................................. 10 5.12 Supplemental Arrows-B block ................................... 10 5.13 Combining Diacritical Marks for Symbols block ......................... 11 5.14
    [Show full text]