CLI) Partitions I to IV

Total Page:16

File Type:pdf, Size:1020Kb

CLI) Partitions I to IV Standard ECMA-335 December 2001 Standardizing Information and Communication Systems Common Language Infrastructure (CLI) Partitions I to IV Phone: +41 22 849.60.00 - Fax: +41 22 849.60.01 - URL: http://www.ecma.ch - Internet: [email protected] Standard ECMA-335 December 2001 Standardizing Information and Communication Systems Common Language Infrastructure (CLI) Partitions I to IV Partition I : Concepts and Architecture Partition II : Metadata Definition and Semantics Partition III : CIL Instruction Set Partition IV : Profiles and Libraries Phone: +41 22 849.60.00 - Fax: +41 22 849.60.01 - URL: http://www.ecma.ch - Internet: [email protected] mb - Ecma-335-Part-I-IV.doc - 16.01.2002 16:02 Common Language Infrastructure (CLI) Partition I: Concepts and Architecture - i - Table of Contents 1Scope 1 2 Conformance 2 3 References 3 4 Glossary 4 5 Overview of the Common Language Infrastructure 19 5.1 Relationship to Type Safety 19 5.2 Relationship to Managed Metadata-driven Execution 20 5.2.1 Managed Code 20 5.2.2 Managed Data 21 5.2.3 Summary 21 6 Common Language Specification (CLS) 22 6.1 Introduction 22 6.2 Views of CLS Compliance 22 6.2.1 CLS Framework 22 6.2.2 CLS Consumer 22 6.2.3 CLS Extender 23 6.3 CLS Compliance 23 6.3.1 Marking Items as CLS-Compliant 24 7 Common Type System 25 7.1 Relationship to Object-Oriented Programming 27 7.2 Values and Types 27 7.2.1 Value Types and Reference Types 27 7.2.2 Built-in Types 27 7.2.3 Classes, Interfaces and Objects 28 7.2.4 Boxing and Unboxing of Values 29 7.2.5 Identity and Equality of Values 29 7.3 Locations 30 7.3.1 Assignment Compatible Locations 30 7.3.2 Coercion 30 7.3.3 Casting 31 7.4 Type Members 31 - ii - 7.4.1 Fields, Array Elements, and Values 31 7.4.2 Methods 31 7.4.3 Static Fields and Static Methods 32 7.4.4 Virtual Methods 32 7.5 Naming 32 7.5.1 Valid Names 32 7.5.2 Assemblies and Scoping 33 7.5.3 Visibility, Accessibility, and Security 34 7.6 Contracts 36 7.6.1 Signatures 37 7.7 Assignment Compatibility 40 7.8 Type Safety and Verification 40 7.9 Type Definers 40 7.9.1 Array Types 41 7.9.2 Unmanaged Pointer Types 43 7.9.3 Delegates 43 7.9.4 Interface Type Definition 43 7.9.5 Class Type Definition 44 7.9.6 Object Type Definitions 46 7.9.7 Value Type Definition 48 7.9.8 Type Inheritance 49 7.9.9 Object Type Inheritance 49 7.9.10 Value Type Inheritance 49 7.9.11 Interface Type Inheritance 49 7.10 Member Inheritance 50 7.10.1 Field Inheritance 50 7.10.2 Method Inheritance 50 7.10.3 Property and Event Inheritance 50 7.10.4 Hiding, Overriding, and Layout 50 7.11 Member Definitions 51 7.11.1 Method Definitions 52 7.11.2 Field Definitions 52 7.11.3 Property Definitions 52 7.11.4 Event Definitions 53 7.11.5 Nested Type Definitions 54 8 CLI Metadata 55 8.1 Components and Assemblies 55 - iii - 8.2 Accessing Metadata 55 8.2.1 Metadata Tokens 55 8.2.2 Member Signatures in Metadata 56 8.3 Unmanaged Code 56 8.4 Method Implementation Metadata 56 8.5 Class Layout 56 8.6 Assemblies: Name Scopes for Types 57 8.7 Metadata Extensibility 58 8.8 Globals, Imports, and Exports 59 8.9 Scoped Statics 59 9 Name and Type Rules for the Common Language Specification 60 9.1 Identifiers 60 9.2 Overloading 60 9.3 Operator Overloading 61 9.3.1 Unary Operators 61 9.3.2 Binary Operators 62 9.3.3 Conversion Operators 63 9.4 Naming Patterns 63 9.5 Exceptions 64 9.6 Custom Attributes 64 10 Collected CLS Rules 66 11 Virtual Execution System 69 11.1 Supported Data Types 69 11.1.1 Native Size: native int, native unsigned int, O and & 70 11.1.2 Handling of Short Integer Data Types 71 11.1.3 Handling of Floating Point Datatypes 71 11.1.4 CIL Instructions and Numeric Types 74 11.1.5 CIL Instructions and Pointer Types 75 11.1.6 Aggregate Data 76 11.2 Module Information 79 11.3 Machine State 79 11.3.1 The Global State 79 11.3.2 Method State 80 11.4 Control Flow 83 11.4.1 Method Calls 84 11.4.2 Exception Handling 87 - iv - 11.5 Proxies and Remoting 92 11.6 Memory Model and Optimizations 92 11.6.1 The Memory Store 92 11.6.2 Alignment 92 11.6.3 Byte Ordering 93 11.6.4 Optimization 93 11.6.5 Locks and Threads 93 11.6.6 Atomic Reads and Writes 94 11.6.7 Volatile Reads and Writes 94 11.6.8 Other Memory Model Issues 94 11.7 Atomicity of Memory Accesses 95 12 Index 97 1 1Scope 2 This ECMA Standard defines the Common Language Infrastructure (CLI) in which applications written in 3 multiple high level languages may be executed in different system environments without the need to rewrite the 4 application to take into consideration the unique characteristics of those environments. This ECMA Standard 5 consists of several sections in order to facilitate understanding various components by describing those 6 components in their separate sections. These sections are: 7 Partition I: Architecture 8 Partition II: Metadata Definition and Semantics 9 Partition III: CIL Instruction Set 10 Partition IV: Profiles and Libraries 11 Partition V: Annexes - 2 - 1 2Conformance 2 A system claiming conformance to this ECMA Standard shall implement all the mandatory requirements of 3 this standard, and shall specify the profile (see Partition IV) that it implements. The minimal implementation is 4 the Kernel Profile (see Partition IV). A conforming implementation may also include additional functionality 5 that does not prevent running code written to rely solely on the profile as specified in this standard. For 6 example, it may provide additional classes, new methods on existing classes, or a new interface on a 7 standardized class, but it shall not add methods or properties to interfaces specified in this standard. 8 A compiler that generates Common Intermediate Language (CIL, see Partition III) and claims conformance to 9 this ECMA Standard shall produce output files in the format specified in this standard and the CIL it generates 10 shall be valid CIL as specified in this standard. Such a compiler may also claim that it generates verifiable 11 code, in which case the CIL it generates shall be verifiable as specified in this standard. - 3 - 1 3 References 2 IEC 60559:1989, Binary Floating-point Arithmetic for Microprocessor Systems (previously designated IEC 3 559:1989) 4 ISO/IEC 10646 (all parts), Information technology — Universal Multiple-Octet Coded Character Set (UCS). 5 The Unicode Consortium. The Unicode Standard, Version 3.0, defined by: The Unicode Standard, Version 3.0 6 (Reading, MA, Addison-Wesley, 2000. ISBN 0-201-61633-5), and Unicode Technical Report #15: Unicode 7 Normalization Forms. 8 ISO/IEC 646:1991 Information technology -- ISO 7-bit coded character set for information interchange 9 ISO/IEC 11578:1996 (E) Information technology - Open Systems Interconnection - Remote Procedure Call 10 (RPC), Annex A: Universal Unique Identifier 11 Federal Information Processing Standard (FIPS 180-1), Secure Hash Standard (SHA-1), 1995 April 7. 12 Extensible Markup Language (XML) 1.0 (Second Edition), 2000 October 6, http://www.w3.org/TR/2000/REC- 13 xml-20001006 14 Network Working Group. RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1. R. Fielding, J. Gettys, J. 15 Mogul, H. Frystyk, L. Masinter, P. Leach, T. Berners-Lee. 1999 June, ftp://ftp.isi.edu/in-notes/rfc2616.txt 16 Network Working Group. RFC 2617: HTTP Authentication: Basic and Digest Access Authentication. J. 17 Franks, P. Hallam-Baker, J. Hostetler, S. Lawrence, P. Leach, A. Luotonen, L. Stewart. 1999 June, 18 ftp://ftp.isi.edu/in-notes/rfc2617.txt 19 IETF (Internet Engineering Task Force). RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax. T. 20 Berners-Lee, R. Fielding, L. Masinter. 1998 August, http://www.ietf.org/rfc/rfc2396.txt. 21 Network Working Group. RFC-1222: Advancing the NSFNET Routing Architecture. H-W Braun, Y. Rekhter. 22 1991 May, ftp://ftp.isi.edu/in-notes/rfc1222.txt -4- 1 4Glossary 2 For the purpose of this ECMA Standard, the following definitions apply. They are collected here for ease of 3 reference, but the definition is presented in context elsewhere in the specification, as noted. Definitions 4 enclosed in square brackets [ ] were not extracted from the body of the standard. 5 The remainder of this section and its subsections contain only informative text Term Description Pt Ch Section Abstract Only an abstract object type is allowed to define method I 7.9.6.2 Concreteness contracts for which the type or the VES does not also provide the implementation. Such method contracts are called abstract methods Accessibility A type scopes all of its members, and it also specifies I 7.5.3.2 Accessibility of of members the accessibility rules for its members. Except where Members noted, accessibility is decided based only on the statically visible type of the member being referenced and the type and assembly that is making the reference. The CTS supports seven different rules for accessibility: Compiler-Controlled; Private; Family; Assembly; Family-and-Assembly; Family-or-Assembly; Public.
Recommended publications
  • The Architecture of Decentvm
    The Architecture of the DecentVM Towards a Decentralized Virtual Machine for Many-Core Computing Annette Bieniusa Johannes Eickhold Thomas Fuhrmann University of Freiburg, Germany Technische Universitat¨ Munchen,¨ Germany [email protected] fjeick,[email protected] Abstract We have accomplished these goals by combining an off-line Fully decentralized systems avoid bottlenecks and single points transcoder with a virtual machine that executes modified bytecode. of failure. Thus, they can provide excellent scalability and very The transcoder performs the verification and statically links the robust operation. The DecentVM is a fully decentralized, distributed required classes of an application or library. Thereby, the resulting virtual machine. Its simplified instruction set allows for a small binary – a so-called blob – is significantly smaller than the original VM code footprint. Its partitioned global address space (PGAS) class files, and its execution requires a significantly less complex memory model helps to easily create a single system image (SSI) virtual machine. Both these effects result in the low memory across many processors and processor cores. Originally, the VM was footprint of DecentVM. designed for networks of embedded 8-bit processors. Meanwhile, All libraries that are required by an application are identified via it also aims at clusters of many core processors. This paper gives a cryptographic hashes. Thus, an application’s code can be deployed brief overview of the DecentVM architecture. as if it was a statically linked executable. The software vendor can thus test the executable as it runs on the customer site without Categories and Subject Descriptors C.1.4 [Processor Architec- interference from different library versions.
    [Show full text]
  • Non-Invasive Software Transactional Memory on Top of the Common Language Runtime
    University of Neuchâtel Computer Science Department (IIUN) Master of Science in Computer Science Non-Invasive Software Transactional Memory on top of the Common Language Runtime Florian George Supervised by Prof. Pascal Felber Assisted by Patrick Marlier August 16, 2010 This page is intentionally left blank Table of contents 1 Abstract ................................................................................................................................................. 3 2 Introduction ........................................................................................................................................ 4 3 State of the art .................................................................................................................................... 6 4 The Common Language Infrastructure .................................................................................. 7 4.1 Overview of the Common Language Infrastructure ................................... 8 4.2 Common Language Runtime.................................................................................. 9 4.3 Virtual Execution System ........................................................................................ 9 4.4 Common Type System ........................................................................................... 10 4.5 Common Intermediate Language ..................................................................... 12 4.6 Common Language Specification.....................................................................
    [Show full text]
  • Dynamically Loaded Classes As Shared Libraries: an Approach to Improving Virtual Machine Scalability
    Dynamically Loaded Classes as Shared Libraries: an Approach to Improving Virtual Machine Scalability Bernard Wong Grzegorz Czajkowski Laurent Daynès University of Waterloo Sun Microsystems Laboratories 200 University Avenue W. 2600 Casey Avenue Waterloo, Ontario N2L 3G1, Canada Mountain View, CA 94043, USA [email protected] {grzegorz.czajkowski, laurent.daynes}@sun.com Abstract machines sold today have sufficient amount of memory to hold a few instances of the Java virtual machine (JVMTM) Sharing selected data structures among virtual [2]. However, on servers hosting many applications, it is machines of a safe language can improve resource common to have many instances of the JVM running utilization of each participating run-time system. The simultaneously, often for lengthy periods of time. challenge is to determine what to share and how to share Aggregate memory requirement can therefore be large, it in order to decrease start-up time and lower memory and meeting it by adding more memory is not always an footprint without compromising the robustness of the option. In these settings, overall memory footprint must be system. Furthermore, the engineering effort required to kept to a minimum. For personal computer users, the main implement the system must not be prohibitive. This paper irritation is due to long start-up time, as they expect good demonstrates an approach that addresses these concerns TM responsiveness from interactive applications, which in in the context of the Java virtual machine. Our system contrast is of little importance in enterprise computing. transforms packages into shared libraries containing C/C++ programs typically do not suffer from excessive classes in a format matching the internal representation memory footprint or lengthy start-up time.
    [Show full text]
  • Proceedings of the Third Virtual Machine Research and Technology Symposium
    USENIX Association Proceedings of the Third Virtual Machine Research and Technology Symposium San Jose, CA, USA May 6–7, 2004 © 2004 by The USENIX Association All Rights Reserved For more information about the USENIX Association: Phone: 1 510 528 8649 FAX: 1 510 548 5738 Email: [email protected] WWW: http://www.usenix.org Rights to individual papers remain with the author or the author's employer. Permission is granted for noncommercial reproduction of the work for educational or research purposes. This copyright notice must be included in the reproduced paper. USENIX acknowledges all trademarks herein. MCI-Java: A Modified Java Virtual Machine Approach to Multiple Code Inheritance Maria Cutumisu, Calvin Chan, Paul Lu and Duane Szafron Department of Computing Science, University of Alberta {meric, calvinc, paullu, duane}@cs.ualberta.ca Abstract Java has multiple inheritance of interfaces, but only single inheritance of code via classes. This situation results in duplicated code in Java library classes and application code. We describe a generalization to the Java language syntax and the Java Virtual Machine (JVM) to support multiple inheritance of code, called MCI-Java. Our approach places multiply-inherited code in a new language construct called an implementation, which lies between an interface and a class in the inheritance hierarchy. MCI-Java does not support multiply-inherited data, which can cause modeling and performance problems. The MCI-Java extension is implemented by making minimal changes to the Java syntax, small changes to a compiler (IBM Jikes), and modest localized changes to a JVM (SUN JDK 1.2.2). The JVM changes result in no measurable performance overhead in real applications.
    [Show full text]
  • Design and Implementation of a Scala Compiler Backend Targeting the Low Level Virtual Machine Geoffrey Reedy
    University of New Mexico UNM Digital Repository Computer Science ETDs Engineering ETDs 5-1-2014 Design and Implementation of a Scala Compiler Backend Targeting the Low Level Virtual Machine Geoffrey Reedy Follow this and additional works at: https://digitalrepository.unm.edu/cs_etds Recommended Citation Reedy, Geoffrey. "Design and Implementation of a Scala Compiler Backend Targeting the Low Level Virtual Machine." (2014). https://digitalrepository.unm.edu/cs_etds/67 This Thesis is brought to you for free and open access by the Engineering ETDs at UNM Digital Repository. It has been accepted for inclusion in Computer Science ETDs by an authorized administrator of UNM Digital Repository. For more information, please contact [email protected]. Geoffrey Reedy Candidate Computer Science Department This thesis is approved, and it is acceptable in quality and form for publication: Approved by the Thesis Committee: Darko Stefanovic , Chairperson Jed Crandall Matthew Lakin Design and Implementation of a Scala Compiler Backend Targeting the Low Level Virtual Machine by Geoffrey Reedy B.S., Computer Science, University of Missouri — Rolla, 2004 THESIS Submitted in Partial Fulfillment of the Requirements for the Degree of Master of Science Computer Science The University of New Mexico Albuquerque, New Mexico May, 2014 ©2014, Geoffrey Reedy iii Design and Implementation of a Scala Compiler Backend Targeting the Low Level Virtual Machine by Geoffrey Reedy B.S., Computer Science, University of Missouri — Rolla, 2004 M.S., Computer Science, University of New Mexico, 2014 Abstract The Scala programming language successfully blends object-oriented and functional programming. The current implementation of Scala is tied to the Java Virtual Machine (JVM) which constrains the implementation and deployment targets.
    [Show full text]
  • Java and C CSE351, Summer 2018
    L23: Java and C CSE351, Summer 2018 Java and C CSE 351 Summer 2018 Instructor: Justin Hsia Teaching Assistants: Josie Lee Natalie Andreeva Teagan Horkan https://xkcd.com/801/ L23: Java and C CSE351, Summer 2018 Administrivia Lab 5 due Friday (8/17) at 11:59 pm . Hard deadline Course evaluations now open . See Piazza post @120 for links Final Exam: Friday in lecture . Review Session: Wed, 8/15, 5‐6:30 pm in EEB 045 . You get ONE double‐sided handwritten 8.5 11” cheat sheet 2 L23: Java and C CSE351, Summer 2018 Roadmap C: Java: Memory & data car *c = malloc(sizeof(car)); Car c = new Car(); Integers & floats c->miles = 100; c.setMiles(100); x86 assembly c->gals = 17; c.setGals(17); Procedures & stacks float mpg = get_mpg(c); float mpg = Executables free(c); c.getMPG(); Arrays & structs Memory & caches Assembly get_mpg: Processes language: pushq %rbp movq %rsp, %rbp Virtual memory ... Memory allocation popq %rbp Java vs. C ret OS: Machine 0111010000011000 100011010000010000000010 code: 1000100111000010 110000011111101000011111 Computer system: 3 L23: Java and C CSE351, Summer 2018 Java vs. C Reconnecting to Java (hello CSE143!) . But now you know a lot more about what really happens when we execute programs We’ve learned about the following items in C; now we’ll see what they look like for Java: . Representation of data . Pointers / references . Casting . Function / method calls including dynamic dispatch 4 L23: Java and C CSE351, Summer 2018 Worlds Colliding CSE351 has given you a “really different feeling” about what computers do and how programs execute We have occasionally contrasted to Java, but CSE143 may still feel like “a different world” .
    [Show full text]
  • G22.2110-003 Programming Languages - Fall 2012 Lecture 12
    G22.2110-003 Programming Languages - Fall 2012 Lecture 12 Thomas Wies New York University Review Last lecture I Modules Outline I Classes I Encapsulation and Inheritance I Initialization and Finalization I Dynamic Method Binding I Abstract Classes I Simulating First-Class Functions Sources: I PLP, ch. 9 I PLP, ch. 3.6.3 What is OOP? (part I) The object idea: I bundling of data (data members) and operations (methods) on that data I restricting access to the data An object contains: I data members: arranged as a set of named fields I methods: routines which take the object they are associated with as an argument (known as member functions in C++) A class is a construct which defines the data and methods associated with all of its instances (objects). What is OOP? (part II) The inheritance and dynamic binding ideas: I inheritance: classes can be extended: I by adding new fields I by adding new methods I by overriding existing methods (changing behavior) If class B extends class A, we say that B is a subclass (or a derived or child class) of A, and A is a superclass (or a base or a parent class) of B. I dynamic binding: wherever an instance of a class is required, we can also use an instance of any of its subclasses; when we call one of its methods, the overridden versions are used. Information Hiding in Classes Like modules, classes can restrict access to their data and methods. Unlike modules, classes must take inheritance into account in their access control.
    [Show full text]
  • Common Language Infrastructure (CLI) Partitions I to IV
    Standard ECMA-335 December 2001 Standardizing Information and Communication Systems Common Language Infrastructure (CLI) Partitions I to IV Phone: +41 22 849.60.00 - Fax: +41 22 849.60.01 - URL: http://www.ecma.ch - Internet: [email protected] Standard ECMA-335 December 2001 Standardizing Information and Communication Systems Common Language Infrastructure (CLI) Partitions I to IV Partition I : Concepts and Architecture Partition II : Metadata Definition and Semantics Partition III : CLI Instruction Set Partition IV : Profiles and Libraries Phone: +41 22 849.60.00 - Fax: +41 22 849.60.01 - URL: http://www.ecma.ch - Internet: [email protected] mb - Ecma-335-Part-I-IV.doc - 16.01.2002 16:02 Common Language Infrastructure (CLI) Partition I: Concepts and Architecture - i - Table of Contents 1Scope 1 2 Conformance 2 3 References 3 4 Glossary 4 5 Overview of the Common Language Infrastructure 19 5.1 Relationship to Type Safety 19 5.2 Relationship to Managed Metadata-driven Execution 20 5.2.1 Managed Code 20 5.2.2 Managed Data 21 5.2.3 Summary 21 6 Common Language Specification (CLS) 22 6.1 Introduction 22 6.2 Views of CLS Compliance 22 6.2.1 CLS Framework 22 6.2.2 CLS Consumer 22 6.2.3 CLS Extender 23 6.3 CLS Compliance 23 6.3.1 Marking Items as CLS-Compliant 24 7 Common Type System 25 7.1 Relationship to Object-Oriented Programming 27 7.2 Values and Types 27 7.2.1 Value Types and Reference Types 27 7.2.2 Built-in Types 27 7.2.3 Classes, Interfaces and Objects 28 7.2.4 Boxing and Unboxing of Values 29 7.2.5 Identity and Equality of Values 29
    [Show full text]
  • Majnemer-Fuzzingclang.Pdf
    Fuzzing Clang to find ABI Bugs David Majnemer What’s in an ABI? • The size, alignment, etc. of types • Layout of records, RTTI, virtual tables, etc. • The decoration of types, functions, etc. • To generalize: anything that you need N > 1 compilers to agree upon C++: A complicated language union U { int a; int b; }; ! int U::*x = &U::a; int U::*y = &U::b; ! Does ‘x’ equal ‘y’ ? We’ve got a standard How hard could it be? “[T]wo pointers to members compare equal if they would refer to the same member of the same most derived object or the same subobject if indirection with a hypothetical object of the associated class type were performed, otherwise they compare unequal.” No ABI correctly implements this. Why does any of this matter? • Data passed across ABI boundaries may be interpreted by another compiler • Unpredictable things may happen if two compilers disagree about how to interpret this data • Subtle bugs can be some of the worst bugs Finding bugs isn’t easy • ABI implementation techniques may collide with each other in unpredictable ways • One compiler permutes field order in structs if the alignment is 16 AND it has an empty virtual base AND it has at least one bitfield member AND … • Some ABIs are not documented • Even if they are, you can’t always trust the documentation What happens if we aren’t proactive • Let users find our bugs for us • This can be demoralizing for users, eroding their trust • Altruistic; we must hope that the user will file the bug • At best, the user’s time has been spent on something they probably didn’t want to do Let computers find the bugs 1.
    [Show full text]
  • ILE C/C++ Language Reference, SC09-7852
    IBM IBM i Websphere Development Studio ILE C/C++ Language Reference 7.1 SC09-7852-02 IBM IBM i Websphere Development Studio ILE C/C++ Language Reference 7.1 SC09-7852-02 Note! Before using this information and the product it supports, be sure to read the general information under “Notices” on page 355. This edition applies to IBM i 7.1, (program 5770-WDS), ILE C/C++ compilers, and to all subsequent releases and modifications until otherwise indicated in new editions. This version does not run on all reduced instruction set computer (RISC) models nor does it run on CISC models. © Copyright IBM Corporation 1998, 2010. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents About ILE C/C++ Language Reference Digraph characters ........... 27 (SC09-7852-01) ........... ix Trigraph sequences ........... 28 Who should read this book ......... ix Comments............... 28 Highlighting Conventions .......... x How to Read the Syntax Diagrams ....... x Chapter 3. Data objects and Prerequisite and related information ...... xii declarations ............ 31 How to send your comments ........ xii Overview of data objects and declarations .... 31 Overview of data objects ......... 31 What's new for IBM i 7.1 ....... xv Incomplete types .......... 32 Compatible and composite types ..... 32 Chapter 1. Scope and linkage ..... 1 Overview of data declarations and definitions .. 33 Tentative definitions ......... 34 Scope ................. 1 Storage class specifiers........... 35 Block/local scope ............ 2 The auto storage class specifier ....... 35 Function scope ............ 2 Storage duration of automatic variables ... 35 Function prototype scope ......... 3 Linkage of automatic variables ...... 36 File/global scope ...........
    [Show full text]
  • Programming with Windows Forms
    A P P E N D I X A ■ ■ ■ Programming with Windows Forms Since the release of the .NET platform (circa 2001), the base class libraries have included a particular API named Windows Forms, represented primarily by the System.Windows.Forms.dll assembly. The Windows Forms toolkit provides the types necessary to build desktop graphical user interfaces (GUIs), create custom controls, manage resources (e.g., string tables and icons), and perform other desktop- centric programming tasks. In addition, a separate API named GDI+ (represented by the System.Drawing.dll assembly) provides additional types that allow programmers to generate 2D graphics, interact with networked printers, and manipulate image data. The Windows Forms (and GDI+) APIs remain alive and well within the .NET 4.0 platform, and they will exist within the base class library for quite some time (arguably forever). However, Microsoft has shipped a brand new GUI toolkit called Windows Presentation Foundation (WPF) since the release of .NET 3.0. As you saw in Chapters 27-31, WPF provides a massive amount of horsepower that you can use to build bleeding-edge user interfaces, and it has become the preferred desktop API for today’s .NET graphical user interfaces. The point of this appendix, however, is to provide a tour of the traditional Windows Forms API. One reason it is helpful to understand the original programming model: you can find many existing Windows Forms applications out there that will need to be maintained for some time to come. Also, many desktop GUIs simply might not require the horsepower offered by WPF.
    [Show full text]
  • NET Core 3 and Unit Testing
    Learn C# Programming A guide to building a solid foundation in C# language for writing efcient programs Marius Bancila Rafaele Rialdi Ankit Sharma BIRMINGHAM—MUMBAI Learn C# Programming Copyright © 2020 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every efort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. Commissioning Editor: Richa Tripathi Acquisition Editor: Alok Dhuri Senior Editor: Storm Mann Content Development Editor: Ruvika Rao Technical Editor: Pradeep Sahu Copy Editor: Safs Editing Language Support Editor: Safs Editing Project Coordinator: Francy Puthiry Proofreader: Safs Editing Indexer: Pratik Shirodkar Production Designer: Jyoti Chauhan First published: April 2020 Production reference: 1280420 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78980-586-4 www.packt.com To my smart boys, Cristian and Bogdan, who love learning new things every day.
    [Show full text]