OS/2 REXX: from Bark to Byte

Total Page:16

File Type:pdf, Size:1020Kb

OS/2 REXX: from Bark to Byte OS/2 REXX: From Bark to Byte Document Number GG24-4199-00 December 1993 International Technical Support Organization Boca Raton Center Take Note! Before using this information and the product it supports, be sure to read the general information under “Special Notices” on page xix. First Edition (December 1993) This edition applies to OS/2 2.1. Order publications through your IBM representative or the IBM branch office serving your locality. Publications are not stocked at the address given below. An ITSO Technical Bulletin Evaluation Form for reader′s feedback appears facing Chapter 1. If the form has been removed, comments may be addressed to: IBM Corporation, International Technical Support Organization Dept. 91J, Building 235-2 Internal Zip 4423 901 NW 51st Street Boca Raton, Florida 33431-1328 When you send information to IBM, you grant IBM a non-exclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you. Copyright International Business Machines Corporation 1993. All rights reserved. Note to U.S. Government Users — Documentation related to restricted rights — Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp. Abstract This document describes OS/2 REXX from a usage and application scenario basis. It includes OS/2 REXX interfaces to CM/2, DB2/2 and MMPM/2. This document is intended for IBM system engineers, IBM technical advisors, IBM authorized dealers, IBM customers and others who require a knowledge of OS/2 2.1 REXX and its interfaces. A working knowledge of OS/2 2.1 and REXX is assumed. PS (336 pages) Copyright IBM Corp. 1993 iii iv OS/2 REXX Contents Abstract . iii Figures . xiii Tables . xvii Special Notices . xix Preface . xxi How This Document is Organized ....................... xxi Related Publications . xxii International Technical Support Organization Publications ........ xxiii Acknowledgments . xxiii Chapter 1. Why REXX? . 1 1.1 Power of OS/2 2.1 REXX ............................ 2 1.2 Example . 5 1.2.1 Sample 1 FAH2CEL.CMD ......................... 5 Chapter 2. OS/2 REXX Specifics ......................... 9 2.1 Calling from a REXX Procedure ....................... 9 2.1.1 The REXX Call Instruction ....................... 10 2.1.2 Calling OS/2 .EXE or Command Files ................ 11 2.1.3 Multitasking with START and DETACH ............... 15 2.2 File I/O with OS/2 REXX ........................... 18 2.2.1 Charin(name,start,length) . 19 2.2.2 Charout(name,string,start) . 20 2.2.3 Chars(name) . 20 2.2.4 Linein(name,line,count) . 21 2.2.5 Lineout(name,string,line) . 21 2.2.6 Lines(name) . 22 2.2.7 Stream(name,operation,streamcommand) . 22 2.2.8 Examples . 23 2.3 RxQueue . 25 2.3.1 PUSH . 25 2.3.2 QUEUE . 25 2.3.3 Private Queues Using RXQUEUE ................... 26 2.3.4 LIFO, FIFO and CLEAR ......................... 38 2.4 Printing . 38 2.4.1 PRINT Command . 39 Copyright IBM Corp. 1993 v 2.4.2 Lineout and Charout .......................... 39 2.4.3 Printer Objects . 39 2.5 PMREXX, REXXTRY and RxMessageBox ................ 42 2.5.1 PMREXX . 42 2.5.2 REXXTRY ................................. 46 2.5.3 RxMessageBox . 47 Chapter 3. External Functions . 49 3.1 Usefulness . 49 3.2 How to Register External Functions ................... 50 3.3 Example - Accessing User Profile Management Services ...... 51 3.4 Some Established External Function Packages ............. 52 Chapter 4. REXX Utilities External Function Package (REXXUTIL) .... 53 4.1 Drives, Directories and Files ........................ 54 4.1.1 SysDriveMap . 54 4.1.2 SysDriveInfo . 56 4.1.3 SysFileDelete . 58 4.1.4 SysFileTree . 58 4.1.5 SysFileSearch . 58 4.1.6 SysMkDir . 60 4.1.7 SysSearchPath . 60 4.2 Workplace Shell Objects .......................... 60 4.2.1 SysCreateObject . 61 4.2.2 SysSetObjectData . 62 4.3 Miscalleneus Functions . 64 4.3.1 SysCls . 65 4.3.2 SysCurPos . 65 4.3.3 SysCurState . 65 4.3.4 SysGetKey . 66 4.3.5 SysSleep . 66 4.3.6 SysTextScreenRead . 67 4.3.7 SysTextScreenSize . 67 Chapter 5. The Workplace Shell and REXX .................. 69 5.1 Objects and Object Classes ........................ 69 5.1.1 WPFileSystem . 71 5.1.2 WPAbstract . 71 5.1.3 WPTransient . 71 5.2 Creating Objects . 72 5.2.1 Creating a Folder Object ........................ 72 5.2.2 Creating a Program Object ...................... 74 5.2.3 Creating a Shadow Object ....................... 75 vi OS/2 REXX 5.2.4 Creating a Program Object in the Startup Folder ......... 76 5.3 Creating Drag and Drop REXX Programs ................ 77 5.4 Creating (Shadow) Objects Associated With Data Files ........ 78 5.5 Modifying Workplace Shell Objects .................... 79 5.5.1 Object IDs . 79 5.5.2 RC Files . 79 5.5.3 User INI File ............................... 80 5.5.4 SysSetObjectData . 81 5.6 Moving Objects . 84 5.7 SysIni . 84 5.7.1 Using SysIni to Change System Settings .............. 85 5.7.2 Using SysIni to Read INI Data ..................... 87 5.8 Extended Attributes . 89 Chapter 6. REXX and C ............................. 93 6.1 Creating C Functions for REXX ...................... 93 6.1.1 RXSTRING . 94 6.1.2 Writing the C Function ......................... 94 6.1.3 Parameter Handling . 97 6.2 Creating DLLs Callable by REXX Programs ............... 100 6.3 Calling REXX from C (REXXSTART Function) .............. 101 Chapter 7. Multimedia REXX . 105 7.1 MMPM/2 Installation . 106 7.2 Using MCI from REXX ............................ 106 7.2.1 Registering MMPM/2 Functions .................... 106 7.2.2 Checking if MMPM/2 is Installed ................... 106 7.2.3 Opening a Media Device ........................ 107 7.2.4 Error Checking . 108 7.2.5 MCI Commands . 108 7.2.6 ACQUIRE . 109 7.2.7 CAPABILITY . 109 7.2.8 CLOSE object . 110 7.2.9 CONNECTOR . 110 7.2.10 INFO . 111 7.2.11 Load . 111 7.2.12 PAUSE . 112 7.2.13 PLAY . 112 7.2.14 RECORD . 113 7.2.15 RELEASE . 113 7.2.16 RESUME . 113 7.2.17 SAVE . 114 7.2.18 SEEK . 114 Contents vii 7.2.19 SET . 114 7.2.20 STATUS . 115 7.2.21 STOP . 115 7.3 RXPLAY.EXE . 115 Chapter 8. REXX Interfaces to CM/2 EHLLAPI ................ 125 8.1 EHLLAPI Uses . 125 8.2 Calling EHLLAPI Functions from REXX Programs ........... 126 8.3 Connecting and Disconnecting Host Sessions ............. 127 8.4 Reading the Host Screen .......................... 128 8.4.1 How to Obtain the Presentation Space Dimensions ........ 128 8.4.2 Copying the Presentation Space ................... 129 8.4.3 Searching the Presentation Space .................. 130 8.5 Sending Keystrokes to the Host Session ................ 131 8.6 Determining Host Availability ....................... 131 8.6.1 Using Screen Changes to Manage Host Availability ....... 132 8.6.2 Query Host Update Function ..................... 134 8.6.3 Pause Function . 135 8.6.4 Wait Function ............................... 136 8.6.5 A Sample Host Checking Algorithm ................. 136 8.7 A Sample EHLLAPI Program - EHLRDR.CMD .............. 137 8.8 Sending and Receiving Files ........................ 145 8.8.1 Example - EHLSF.CMD ......................... 145 8.8.2 Example - EHLRECV.CMD ....................... 147 8.9 Manipulating the Presentation Space Window ............. 150 Chapter 9. REXX Interfaces to DB2/2 ..................... 151 9.1 DB2/2 Installation and Setup ........................ 151 9.2 How to Register DB2/2 Functions ..................... 152 9.3 User Profile Management (UPM) ..................... 153 9.4 DB2/2 Database Administration ...................... 154 9.4.1 Server Workstation Database Administration ........... 154 9.4.2 Client Workstation Database Administration ............ 159 9.5 Embedding Structured Query Language (SQL) Statements in REXX Programs . 163 9.5.1 Static vs. Dynamic SQL ........................ 163 9.5.2 SELECT Statement . ..
Recommended publications
  • Programming Paradigms & Object-Oriented
    4.3 (Programming Paradigms & Object-Oriented- Computer Science 9608 Programming) with Majid Tahir Syllabus Content: 4.3.1 Programming paradigms Show understanding of what is meant by a programming paradigm Show understanding of the characteristics of a number of programming paradigms (low- level, imperative (procedural), object-oriented, declarative) – low-level programming Demonstrate an ability to write low-level code that uses various address modes: o immediate, direct, indirect, indexed and relative (see Section 1.4.3 and Section 3.6.2) o imperative programming- see details in Section 2.3 (procedural programming) Object-oriented programming (OOP) o demonstrate an ability to solve a problem by designing appropriate classes o demonstrate an ability to write code that demonstrates the use of classes, inheritance, polymorphism and containment (aggregation) declarative programming o demonstrate an ability to solve a problem by writing appropriate facts and rules based on supplied information o demonstrate an ability to write code that can satisfy a goal using facts and rules Programming paradigms 1 4.3 (Programming Paradigms & Object-Oriented- Computer Science 9608 Programming) with Majid Tahir Programming paradigm: A programming paradigm is a set of programming concepts and is a fundamental style of programming. Each paradigm will support a different way of thinking and problem solving. Paradigms are supported by programming language features. Some programming languages support more than one paradigm. There are many different paradigms, not all mutually exclusive. Here are just a few different paradigms. Low-level programming paradigm The features of Low-level programming languages give us the ability to manipulate the contents of memory addresses and registers directly and exploit the architecture of a given processor.
    [Show full text]
  • A Feature Model of Actor, Agent, Functional, Object, and Procedural Programming Languages
    Accepted Manuscript A feature model of actor, agent, functional, object, and procedural programming languages H.R. Jordan, G. Botterweck, J.H. Noll, A. Butterfield, R.W. Collier PII: S0167-6423(14)00050-1 DOI: 10.1016/j.scico.2014.02.009 Reference: SCICO 1711 To appear in: Science of Computer Programming Received date: 9 March 2013 Revised date: 31 January 2014 Accepted date: 5 February 2014 Please cite this article in press as: H.R. Jordan et al., A feature model of actor, agent, functional, object, and procedural programming languages, Science of Computer Programming (2014), http://dx.doi.org/10.1016/j.scico.2014.02.009 This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain. Highlights • A survey of existing programming language comparisons and comparison techniques. • Definitions of actor, agent, functional, object, and procedural programming concepts. • A feature model of general-purpose programming languages. • Mappings from five languages (C, Erlang, Haskell, Jason, and Java) to this model. A Feature Model of Actor, Agent, Functional, Object, and Procedural Programming Languages H.R. Jordana,∗, G. Botterwecka, J.H. Nolla, A. Butterfieldb, R.W. Collierc aLero, University of Limerick, Ireland bTrinity College Dublin, Dublin 2, Ireland cUniversity College Dublin, Belfield, Dublin 4, Ireland Abstract The number of programming languages is large [1] and steadily increasing [2].
    [Show full text]
  • The Machine That Builds Itself: How the Strengths of Lisp Family
    Khomtchouk et al. OPINION NOTE The Machine that Builds Itself: How the Strengths of Lisp Family Languages Facilitate Building Complex and Flexible Bioinformatic Models Bohdan B. Khomtchouk1*, Edmund Weitz2 and Claes Wahlestedt1 *Correspondence: [email protected] Abstract 1Center for Therapeutic Innovation and Department of We address the need for expanding the presence of the Lisp family of Psychiatry and Behavioral programming languages in bioinformatics and computational biology research. Sciences, University of Miami Languages of this family, like Common Lisp, Scheme, or Clojure, facilitate the Miller School of Medicine, 1120 NW 14th ST, Miami, FL, USA creation of powerful and flexible software models that are required for complex 33136 and rapidly evolving domains like biology. We will point out several important key Full list of author information is features that distinguish languages of the Lisp family from other programming available at the end of the article languages and we will explain how these features can aid researchers in becoming more productive and creating better code. We will also show how these features make these languages ideal tools for artificial intelligence and machine learning applications. We will specifically stress the advantages of domain-specific languages (DSL): languages which are specialized to a particular area and thus not only facilitate easier research problem formulation, but also aid in the establishment of standards and best programming practices as applied to the specific research field at hand. DSLs are particularly easy to build in Common Lisp, the most comprehensive Lisp dialect, which is commonly referred to as the “programmable programming language.” We are convinced that Lisp grants programmers unprecedented power to build increasingly sophisticated artificial intelligence systems that may ultimately transform machine learning and AI research in bioinformatics and computational biology.
    [Show full text]
  • Windows BATCH Scripting Loops
    Windows BATCH Scripting_Loops Table of Contents Loops ............................................................................................................................................... 2 Loops Multiple File Example ........................................................................................................... 5 Loops Directory Example ................................................................................................................ 8 Loops Multiple Lines in a File Example ........................................................................................... 9 Loops Running a Command Multiple Times ................................................................................. 10 For Loops ....................................................................................................................................... 11 Tokenizing Loop Example -1 ........................................................................................................ 13 Tokenizing Loop Example -2 ........................................................................................................ 16 Notices .......................................................................................................................................... 17 Page 1 of 17 Loops Loops A core component of scripts – allow one thing many times Windows batch scripts use “FOR – DO” and has 4 different constructs depending on which switches are used with “FOR” • Multiple Files – perform one command on each file FOR %a
    [Show full text]
  • Chapter 10 Introduction to Batch Files
    Instructor’s Manual Chapter 10 Lecture Notes Introduction to Batch Files Chapter 10 Introduction to Batch Files LEARNING OBJECTIVES 1. Compare and contrast batch and interactive processing. 2. Explain how batch files work. 3. Explain the purpose and function of the REM, ECHO, and PAUSE commands. 4. Explain how to stop or interrupt the batch file process. 5. Explain the function and use of replaceable parameters in batch files. 6. Explain the function of pipes, filters, and redirection in batch files. STUDENT OUTCOMES 1. Use Edit to write batch files. 2. Use COPY CON to write batch files. 3. Write and execute a simple batch file. 4. Write a batch file to load an application program. 5. Use the REM, PAUSE, and ECHO commands in batch files. 6. Terminate a batch file while it is executing. 7. Write batch files using replaceable parameters. 8. Write a batch file using pipes, filters, and redirection. CHAPTER SUMMARY 1. Batch processing means running a series of instructions without interruption. 2. Interactive processing allows the user to interface directly with the computer and update records immediately. 3. Batch files allow a user to put together a string of commands and execute them with one command. 4. Batch files must have the .BAT or .CMD file extension. 5. Windows looks first internally for a command, then for a .COM files extension, then for a .EXE file extension, and finally for a .BAT or .CMD file extension. 6. Edit is a full-screen text editor used to write batch files. 7. A word processor, if it has a means to save files in ASCII, can be used to write batch files.
    [Show full text]
  • A Formal Component-Based Software Engineering Approach for Developing Trustworthy Systems
    A FORMAL COMPONENT-BASED SOFTWARE ENGINEERING APPROACH FOR DEVELOPING TRUSTWORTHY SYSTEMS MUBARAK SAMI MOHAMMAD A THESIS IN THE DEPARTMENT OF COMPUTER SCIENCE AND SOFTWARE ENGINEERING PRESENTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY (COMPUTER SCIENCE) CONCORDIA UNIVERSITY MONTREAL´ ,QUEBEC´ ,CANADA APRIL 2009 °c MUBARAK SAMI MOHAMMAD, 2009 CONCORDIA UNIVERSITY School of Graduate Studies This is to certify that the thesis prepared By: Mr. Mubarak Sami Mohammad Entitled: A Formal Component-Based Software Engineering Approach for Developing Trustworthy Systems and submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy (Computer Science) (Computer Science) complies with the regulations of this University and meets the accepted standards with re- spect to originality and quality. Signed by the final examining committee: Chair Dr. External Examiner Dr. Nicholas Graham External to Program Dr. Jamal Bentahar Examiner Dr. Joey Paquet Examiner Dr. Juergen Rilling Supervisor Dr. Vasu Alagar Co-supervisor Dr. Olga Ormandjieva Approved Chair of Department or Graduate Program Director 20 Dr. Robin A.L. Drew, Dean Faculty of Engineering and Computer Science Abstract A Formal Component-Based Software Engineering Approach for Developing Trustworthy Systems Mubarak Sami Mohammad, Ph.D. Concordia University, 2009 Software systems are increasingly becoming ubiquitous, affecting the way we experience the world. Embedded software systems, especially those used in smart devices, have be- come an essential constituent of the technological infrastructure of modern societies. Such systems, in order to be trusted in society, must be proved to be trustworthy. Trustworthiness is a composite non-functional property that implies safety, timeliness, security, availability, and reliability.
    [Show full text]
  • Comparative Studies of Programming Languages; Course Lecture Notes
    Comparative Studies of Programming Languages, COMP6411 Lecture Notes, Revision 1.9 Joey Paquet Serguei A. Mokhov (Eds.) August 5, 2010 arXiv:1007.2123v6 [cs.PL] 4 Aug 2010 2 Preface Lecture notes for the Comparative Studies of Programming Languages course, COMP6411, taught at the Department of Computer Science and Software Engineering, Faculty of Engineering and Computer Science, Concordia University, Montreal, QC, Canada. These notes include a compiled book of primarily related articles from the Wikipedia, the Free Encyclopedia [24], as well as Comparative Programming Languages book [7] and other resources, including our own. The original notes were compiled by Dr. Paquet [14] 3 4 Contents 1 Brief History and Genealogy of Programming Languages 7 1.1 Introduction . 7 1.1.1 Subreferences . 7 1.2 History . 7 1.2.1 Pre-computer era . 7 1.2.2 Subreferences . 8 1.2.3 Early computer era . 8 1.2.4 Subreferences . 8 1.2.5 Modern/Structured programming languages . 9 1.3 References . 19 2 Programming Paradigms 21 2.1 Introduction . 21 2.2 History . 21 2.2.1 Low-level: binary, assembly . 21 2.2.2 Procedural programming . 22 2.2.3 Object-oriented programming . 23 2.2.4 Declarative programming . 27 3 Program Evaluation 33 3.1 Program analysis and translation phases . 33 3.1.1 Front end . 33 3.1.2 Back end . 34 3.2 Compilation vs. interpretation . 34 3.2.1 Compilation . 34 3.2.2 Interpretation . 36 3.2.3 Subreferences . 37 3.3 Type System . 38 3.3.1 Type checking . 38 3.4 Memory management .
    [Show full text]
  • Learning Objectives ECHO Commands. Command. 10. Explain
    . SA Learning Objectives After completing this chapter you will be able to: 1. List commands used in batch files. 2. List and explain batch file rules. 3. Use a batch file with a shortcut. 3. Explore the function of the REM, 4. Use the SHIFT command to move param- ECHO commands. eters. 4. Explain the use of batch files with shortcuts. 5. Use the IF command with strings for condi- 5. Explain the purpose and function of the tional processing. GOTO command. 6. Test for null values in a batch file. 6. Explain the purpose and function of the 7. Use the IF EXIST /IF SHIFT command. test for the existence of a file or a 7. Explain the purpose and function of the IF subdirectory. command. 8. Use the SET command. 8. Explain the purpose and function of the IF 9. Use the environment and environmental EXIST /IF variables in batch files. 9. Explain the purpose and function of the IF 10. Use the IF ERRORLEVEL command ERRORLEVEL command. XCOpy to write a batch file for testing exit 10. Explain the purpose and function of writing codes. programs. 11. Use the FOR...IN...OO command for repeti- 11. Explain the purpose and function of the tive processing. environment and environmental variables. 12. Use the CALL command in a batch file. 12. Explain the use of the SET command. 13. Explain the purpose and function of the Chapter Overview FOR...IN...OO command. You learned in Chapter 10 how to write simple 14. Explain the purpose and function of the batch files and use replaceable parameters.
    [Show full text]
  • Starting a Batch File Example
    LA Solutions ShellBatch.doc Starting a Batch File from MicroStation There have been a couple of questions in the MicroStation newsgroups along the lines of “How do I start an operating system batch file without leaving MicroStation?” One answer to the question is to use Visual Basic for Applications (VBA), which is part and parcel of MicroStation V8. VBA provides extensive functionality, which you can extend by referencing built-in Visual Basic (VB) methods, and even by calling the Win32 native application programming interface (API) directly. VB provides a Shell() method, which means ‘attempt to start whatever executable program I give you’. A batch file (having a .bat extension) is not an executable file. The way to ‘execute’a batch file is to give its path to the Windows built-in command executable cmd.exe. The way to persuade the operating system to do something with a batch file is to put these ideas together like this… Shell(“cmd.exe /k batchfile.bat”) Unfortunately, things aren’t always as simple as we would like, because Shell() can’t itself divine the location of the executable file. The VBA project ShellBatch.mvba takes care of these details, and all you have to know is how to start it. 1. Copy ShellBatch.mvba to one of the folders in your computer’s VBA search path (MS_VBASEARCHDIRECTORIES). C:\Program Files\Bentley\Workspace\Standards\VBA is a good choice 2. Open MicroStation’s key-in window from the Utilities menu 3. Start your batch file with the following key-in: you must know the full path to the file: vba run [ShellBatch].Module1.Main <batch file path> For example: vba run [ShellBatch]Module1.Main D:\temp\test.bat Copyright © LA Solutions 2003…2005 visit http://www.la-solutions.co.uk.
    [Show full text]
  • Programming Languages
    Lecture 19 / Chapter 13 COSC1300/ITSC 1401/BCIS 1405 12/5/2004 Lecture 19 / Chapter 13 COSC1300/ITSC 1401/BCIS 1405 12/5/2004 General Items: Computer Program • Lab? Ok? • Read the extra credits • A series of instructions that direct a computer to perform tasks • Need to come to class • Such as? Who is the programmer? • Have a quiz / no books / use notes -> What is the big idea • School is almost over • Programming language is a series of rules for writing the instructions • • There are hundreds of computer programs – need-based! Reading Materials: Programming language • - Two basic types: Low- and high-level programming languages Miscellaneous: o Low-level: Programming language that is machine-dependent ° Must be run on specific machines o High-level: Language that is machine-independent ° Can be run on different types of machines Programming Language Low Level High Level Machine Assembly Language Language Procedural Nonprocedural Remember: Ultimately, everything must be converted to the machine language! Object Oriented F.Farahmand 1 / 12 File: lec14chap13f04.doc F.Farahmand 2 / 12 File: lec14chap13f04.doc Lecture 19 / Chapter 13 COSC1300/ITSC 1401/BCIS 1405 12/5/2004 Lecture 19 / Chapter 13 COSC1300/ITSC 1401/BCIS 1405 12/5/2004 Categories of programming languages o Nonprocedural language -> Programmer specifies only what the - Machine language program should accomplish; it does not explain how o Only language computer understands directly - Forth-generation language - Assembly language o Syntax is closer to human language than that
    [Show full text]
  • C++ Tutorial Part I : Procedural Programming
    C++ Tutorial Part I : Procedural Programming C. David Sherrill School of Chemistry and Biochemistry School of Computational Science and Engineering Georgia Institute of Technology Purpose To provide rapid training in elements of C++ syntax, C++ procedural programming, and C++ object- oriented programming for those with some basic prior programming experience To provide a handy programming reference for selected topics To provide numerous, actual C++ code examples for instruction and reference Why C++? “Intermediate”-level language: allows for fine (low- level) control over hardware, yet also allows certain complex tasks to be done with relatively little code (high-level) Good for scientific applications: produces efficient, compiled code, yet has features that help one develop and maintain a complicated, large code (e.g., namespaces, object-oriented design) Recommended reading These notes were developed during my reading of “Sams Teach Yourself C++ in One Hour a Day,” 7th Edition, by Siddhartha Rao (Sams, Indianapolis, 2012). I recommend the book, it’s readable and to the point. A good mastery of C++ will probably require working through a book like that one, and doing some examples; notes like these only serve as a basic introduction or a quick review A Note on C++11 This was originally supposed to be C++0x, with the “x” filled in according to the year the new C++ standard was finalized (e.g., C++09 for 2009). However, the standard took longer than expected, and was only formalized in 2011. So, C++11 is what was formerly referred to as C++0x. As of 2013, the new C++11 standards are not yet fully implemented in many compilers.
    [Show full text]
  • Windows Command Line?
    Table of contents 1. Why an ebook on the Windows Command Line? 2. Make an example directory 3. A little exercise: open the Windows Command Prompt window and go to the example directory 3.1 The prompt 3.2 Moving into a (sub)directory 4. Pattern-matching 5. Command ‘DIR’ and Glob patterns 6. The ‘COPY’ command and Glob patterns 6.1 Copy files from the current directory into a subdirectory 6.2 Copy files from the current directory into a subdirectory in binary mode 6.3 Combine ASCII-files and put the result into a subdirectory 6.4 Combine binary files and put the result into a subdirectory 6.5 Are the files copied correctly? 6.6 Copy a selection of files with the ‘FOR’ loop 7. The ‘DEL’ command and Glob patterns 7.1 Delete files from the current directory 7.2 Delete files from the subdirectory ‘my Doc’ -1 7.3 Delete files from the subdirectory ‘my Doc’ -2 7.3.1 An alternative 7.3.2 ROBOCOPY 8. Passing multiple commands 9. The ‘REN’ or ‘RENAME’ command 9.1 Change subdirectory name 9.2 Change file extensions 9.3 Modify filenames from the current directory: basic examples 9.4 Truncate a filename by using ‘?’ 9.5 Modify filenames in the subdirectory ‘my Doc’: basic example 10. More complex replacements 10.1 Add a prefix to filenames with the same characters at the beginning 10.2 Add a prefix to filenames with the same extensions 10.3 Add a suffix at the end of filenames with the same extensions 10.4 Substitute a character in a specific position 11.
    [Show full text]