Important Data Types Compared

Total Page:16

File Type:pdf, Size:1020Kb

Important Data Types Compared Important Data Types Compared The following table shows the most important simple data types of Win16 and Win32 in direct comparison. The first column shows the type name, the second its definition and length (in bytes) under Win16, and the third the same under Win32. The last column (called Rem.) contains pointers to further remarks and explanations that are found in the mar­ gin. Please note that some portable and Unicode-compatible data types have been introduced with Win32 (TCHAR, and the like), which as of today have no equivalent in Win16. These have not been included in the table. Data type Win16 definition and Win32 definition and Rem. Table A1.1; The most size size important Windows data int/INT int (2) int, INT (4) [1] types in direct comparison char/CHAR char (1) char, CHAR (1) short/SHORT short (2) short, SHORT (2) BOOL int (2) int (4) [1] [1 J The size of the type has BYTE unsigned char (1) unsigned char (1) changed. WORD unsigned short (2) unsigned short (2) DWORD unsigned long (4) unsigned long (4) [2J Win32 pointers are not UINT unsigned int (2) unsigned int (4) [1] built from segment and LONG signed long (4) signed long (4) offset, but just contain a WPARAM UINT (2) UINT (4) [1] (widened) offset; therefore LPARAM LONG (4) LONG (4) segment arithmetics are LRESULT LONG (4) LONG (4) impossible. There's no PSTR char NEAR * (2) char * (4) [1] distinction between NEAR NPSTR char NEAR * (2) char * (4) [1] and FAR pointers. LPSTR char FAR * (4) char * (4) [2] LPCSTR const char FAR * (4) const char * (4) [2] PBYTE BYTE NEAR * (2) BYTE * (4) [1] LPBYTE BYTE FAR * (4) BYTE * (4) [2] 355 Appendix 1: Important Data Types Compared Data type Win16 definition and Win32 definition and Rem. [1 J The size of the type has size size changed. PINT int NEAR * (2) INT * (4) [1] LPINT int FAR * (4) INT * (4) [2] [2J Win32 pointers are not PWORD WORD NEAR * (2) WORD * (4) [1] built from segment and LPWORD WORD FAR * (4) WORD * (4) [2] offset, but just contain a (widened) offset; therefore PLONG long NEAR * (2) long * (4) [1] segment arithmetics are LPLONG long FAR * (4) 10nK * (4) [2] impossible. There's no PDWORD DWORD NEAR * (2) DWORD*(4) [1] distinction between NEAR LPDWORD DWORD FAR * (4) DWORD* (4) [2] and FAR pointers. LPVOID void FAR * (4) void * (4) [2] HANDLE const void NEAR * (2) void * (4) [1] [3J ... similar to the other (STRICT) handle types defined with HANDLE UINT (2) void * (4) [1] DECLARE_HANDLE (HOC, (normal) HMENU, HGDIOBJ, etc.). HWND const struct HWND- const struct HWND- [1,3] [4J One of those pointer (STRICT) NEAR * (2) * (4) types that under Win16 were HWND UINT HANDLE [1,3] dependent on the memory (normal) model (small, medium, etc.). PHANDLE HANDLE * (2) HANDLE * (4) [1,4] SPHANDLE HANDLE NEAR * (2) HANDLE * (4) [1] [5J This is one of the rare LPHANDLE HANDLE FAR * (4) HANDLE * (4) [2] exceptions: a Win16 UlNT ATOM UINT (2) WORD (2) [5] changes to a Win32 WORD HFILE int (2) int (4) [1] (i. e.,the size doesn't FARPROC void (CALLBACK *) int (WIN API *)0 (4) [2,6] change). (void) (4) [6J One of the rare cases WNDPROC LRESULT LRESULT [2,7] where the two header files (CALLBACK *) (CALLBACK *) are not consistent. (HWND, UlNT, (HWND, UlNT, WPARAM, WPARAM, {7] Apart from the parameter LPARAM) (4) LPARAM) (4) list also valid for other CALLBACK functions (like Over and above these standard Windows data types, the Win32 API DLGPROC, etc.). predefines a lot of other simple types, which for the better part stem from the time when Windows NT was still called OS/2 NT. Therefore it should not exactly be astonishing that these type definitions look quite familiar to OS/2 developers. The following small table shows the most 356 I Appendix 1 important of those new, "old" types, which easily can be used in parallel I to the well-known Windows types: Win32 datatyp_e Win32 definition Win16 equivalent(s) Table A1.2: OS/2 compatible UCHAR unsigned char BYTE Win32 data types. USHORT unsigned short WORD,OINT PYOID void * LPVOID PUSHORT USHORT* LPWORD ULONG unsigned long DWORD PULONG ULONG* LPDWORD PSZ char * LPSTR 357 Appendix 2 PORT.INI: Enhanced and Clarified Appendix 2 shows an enhanced and clarified version of the PORTIOOL initialization file PORT.IN!. Of course, a copy of the file is also found on the accompanying disk - possibly even in a somewhat more current version than is printed here (see the subdirectory \PORTIOOL). Using the file is simplicity itself: just rename the original PORT.lNI found in X:\MSTOOLS\BIN (e.g., to PORT.OLD) and copy the enhanced version from the disk to X:\MSTOOLS\BIN. If you start PORTTOOL as usual, the program directly accesses the new file. (Another possibility would be to copy the file with another name, e.g., PORTENH.lNI, and to use the PORTTOOL open command to read in an INI file.) The entries in Divided in seven classes PORT.INI are divided into seven classes: the section [APIS] is responsi­ ble for all Windows functions; [MESSAGES] deals with messages; [STRUCTURES] with struct definitions; [TYPES] handles the simple data types; I assume [CONSTANTS] and [MACROS] are self-explaining. Fi­ nally, [CUSTOM] is a dumping spot for all those items that are not easily assigned to one of the other categories. In a specific group the entries are sorted alphabetically, so the following listing can be used either as a ref­ erence or, if you have a specific question in mind, as an enhancement to the index. Of course, you can easily modify and enhance the file on your own (caution: don't use special characters above the standard 7-bit ASCII set, best regards of strtokO!). If you have to report an improvement or error, please inform me of the change or addition so that this information can be put into subsequent editions. The directory \PORTIOOL also sports a simple application called PORTVIEW.EXE (including source code). This program can be used for PORTVIEW.EXE brOWSing and investigating PORT.INI (or any other file in the proper format). The program also allows you to search the whole file for a spe­ cific item and links to the API WinHelp files. The executable file is a standard portable executable (PE) and can be executed under Windows NT, Windows 95, and Windows 3.1 (with the help of Win32s, see subdi­ rectory \ WIN32S on the disk). Have fun! 359 Appendix 2: PORT.lNI Enhanced and Clarified [PORTroJL] To get help for the various items from within PORTTOOL, specify the path ; where WinHelp can find the API help file. But be forewarned: PORTroJL is ; (not only in this respect) scmewhat "obstinate" (if not to say buggy) •.. WinHelp=z:\hlp\api32wh.hlp Viewing l6-bit help is unfortunately not supported by PORTroJL. This line is read and interpreted by my PORTVIEW program only; it should-contain the location of the Win16 help files (if any) . WinHelpl6=d:\bc\bin\tcwhelp.hlp [APIS] The fonnat for the follwing entries (which can be easily enhanced or changed) is defined as follows (alas, no special characters such as umlauts are allowed in the text) : SearchKey=Win32APIHelpTerm; Reason for the change; Proposed action; There are the following optional variants: SearchKey=APIHelpTerm;Reason for the change; SearchKey=APIHelpTerm; ;Proposed action; SearchKey=APIHelpTerm; ; ; SearchKey= ;Reason for the change;Proposed action; SearchKey= ;Reason for the change; ; SearchKey= ; ;Proposed action; Trailing semicolons are optional. By the way, more about the sections can be found in the book in appendix 2; there also a complete listing of this file is shown! The first line has to appear twice to be read once ... AccessResource=AccessResource;No 32-bit equivalent;Not required, just delete; AccessResource=AccessResource;No 32-bit equivalent;Not required, just delete; AddFontResource=AddFontResource;Only use file names (strings), no handles;; AllocDSToCSAlias=AllocDSToCSAlias;No 32-bit equivalent;; AllocResource=AllocResource;no direct 32-bit equivalent;Replace with Load/Find/LockResource; AllocSelector=AllocSelector;No 32-bit equivalent;; AnsiLower=AnsiLower;Macro around CharLower;; AnsiLowerBuff=AnsiLowerBuff; Macro around CharLowerBuff; ; AnsiNext=AnsiNext;Macro around CharNext; ; AnsiPrev=AnsiPrev;Macro around CharPrev;; AnsiTcDem=AnsiTcQ:m;Macro around CharTcQ:m;; AnsiTcQ:mBuff=AnsiTcQ:mBuff;Macro around CharTcQ:mBuff;; AnsiUpper=AnsiUpper;Macro around CharUpper;; AnsiUpperBuff=AnsiUpperBuff;Macro around CharUpperBuff;; Catch=Catch;No 32-bit equivalent;Replace with structured exception handling (SEH); ChangeMenu=ChangeMenu;New functions available;Replace with portable functions; ChangeSelector=ChangeSelector;No 32-bit equivalent;; CloseCamm=CloseComm;OOMM functions mapped to file I/O;Replace with CloseHandle; CloseSound=CloseSound;No 32-bit equivalent;Replace with multimedia sound support or PlaySo- und/Beep; 360 Appendix 2 CountVoieeNotes=CountVoieeNotes;No 32-bit equivalent;Replace with multimedia sound support or PlaySound/Beep; DefHookProc=DefHookProe;Old hook API, creates only thread-local hooks;Use new CallNextHookEx; DefineHandleTable=DefineHandleTable;No 32-bit equivalent;Not required, just delete; DeviceCapabilities=DeviceCapabilities;No 32-bit equivalent;Replaee with portable DeviceCapa- bilitiesEx; DeviceM:xie=DeviCEM:xie;No 32-bit equivalent;Replace with portable DeviCEM:xieEx; DialogProc=DialogProc;Dialog proes should be defined portable;EOOL CALLBACK WhdProc(HWND hWhd, UINT uMsg, WPARAM wParam, LPARAM lParam); DirectedYield=DirectedYield;No 32-bit equivalent;; DlgDirSelect=DlgDirSelect;No 32-bit equivalent;Replace with portable DlgDirSelectEx; DlgDirSelectComboBox=DlgDirSelectCcmboBox;No 32-bit equivalent;Replaee
Recommended publications
  • Taking Advantage of the SAS System on Windows NT
    Taking advantage of the SAS System on Windows NT Mark W. Cates, SAS Institute Inc., Cary, NC ABSTRACT Unless specified, all the SAS System products and features are provided on both Windows NT Windows NT is fast becoming the universal Workstation and Windows NT Server. This desktop client operating system as well as an paper assumes the current release of Windows important file and compute server for mission NT is Version 4.0. For brevity, the abbreviation critical applications. This paper presents a NT will be used for Windows NT. discussion of the state of Windows NT and how the SAS System Release 6.12 for Windows takes advantage and integrates with the operating Windows Family - Single Executable Image system. Areas such as the user interface, OLE and Web integration are presented. Data access Windows NT is now in its full 3rd generation, and Microsoft BackOffice integration, and with the release of Windows NT Workstation hardware considerations are also presented. 4.0 and Windows NT Server 4.0. NT Workstation and NT Server share the same microkernel, and is portable to several RISC INTRODUCTION platforms, including DEC Alpha AXP, and the PowerPC Prep Platforms. The MIPS chip Microsoft Windows NT sales grew dramatically is no longer supported by Windows NT. The in 1996, as many corporations which have been majority of NT installations still run on the Intel investigating Windows NT have now begun to Pentium® and Pentium Pro® processor. The deploy Windows NT for the client desktop. SAS System Release 6.12 only supports the Intel Many of these deployments were replacing platform, and the Pentium Pro processor is ® Windows 3.1 and Windows 95 .
    [Show full text]
  • 9.4 Flight Operations Data
    REPORT DOCUMENTATION PAGE Form Approved OMB No. 0704-0188 Public reporting burden for this collection of information is estimated to average 1 hour per response, including the time for reviewing instructions, searching existing data sources, gathering and maintaining the data needed, and completing and reviewing the collection of information. Send comments regarding this burden estimate or any other aspect of this collection of information, including suggestions for reducing this burden, to Washington Headquarters Services, Directorate for information Operations and Reports, 1215 Jefferson Davis Highway, Suite 1204, Arlington, VA 22202-4302, and to the Office of Management and Budget, Paperwork Reduction Project (0704-0188), Washington, DC 20503. 1. AGENCY USE ONLY (Leave blank) 2. REPORT DATE 3. REPORT TYPE AND DATES COVERED August 1995 Final Report Jan 93 - Aug 95 4. TITLE AND SUBTITLE 5. FUNDING NUMBERS Integrated Noise Model (INM) Version 5.0 User's Guide DTFA01-93-C-00078 6. AUTHOR(S) Task Orders 2 and 5 ATAC Olmstead, Bryan, Jeng, Mirsky, Rajan* VNTSC Fleming, D'Aprile, Gerbi*, Rickley*, Turner* FA565/A5012 LeTech Le, Le, Chen * subcontractors FAA Plante, Gulding (Prog. Mgr.), Vahovich, Warren 7. PERFORMING ORGANIZATION NAME(S) AND ADDRESS(ES) 8. PERFORMING ORGANIZATION ATAC Corporation DOT/VNTSC LeTech, Inc. REPORT NUMBER 757 N. Mary Ave. DTS-75, Kendall Sq. 5400 Shawnee Rd #202 Sunnyvale, CA 94086 Cambridge, MA 02142 Alexandria, VA 22312 9. SPONSORING/MONITORING AGENCY NAME(S) AND ADDRESS(ES) 10. SPONSORING/MONITORING U.S. Department of Transportation AGENCY REPORT NUMBER Federal Aviation Administration Office of Environment and Energy, AEE-120 FAA-AEE-95-01 800 Independence Ave.
    [Show full text]
  • Windows 95 & NT
    Windows 95 & NT Configuration Help By Marc Goetschalckx Version 1.48, September 19, 1999 Copyright 1995-1999 Marc Goetschalckx. All rights reserved Version 1.48, September 19, 1999 Marc Goetschalckx 4031 Bradbury Drive Marietta, GA 30062-6165 tel. (770) 565-3370 fax. (770) 578-6148 Contents Chapter 1. System Files 1 MSDOS.SYS..............................................................................................................................1 WIN.COM..................................................................................................................................2 Chapter 2. Windows Installation 5 Setup (Windows 95 only)...........................................................................................................5 Internet Services Manager (Windows NT Only)........................................................................6 Dial-Up Networking and Scripting Tool....................................................................................6 Direct Cable Connection ..........................................................................................................16 Fax............................................................................................................................................17 Using Device Drivers of Previous Versions.............................................................................18 Identifying Windows Versions.................................................................................................18 User Manager (NT Only) .........................................................................................................19
    [Show full text]
  • Open WATCOM Programmer's Guide
    this document downloaded from... Use of this document the wings of subject to the terms and conditions as flight in an age stated on the website. of adventure for more downloads visit our other sites Positive Infinity and vulcanhammer.net chet-aero.com Watcom FORTRAN 77 Programmer's Guide Version 1.8 Notice of Copyright Copyright 2002-2008 the Open Watcom Contributors. Portions Copyright 1984-2002 Sybase, Inc. and its subsidiaries. All rights reserved. Any part of this publication may be reproduced, transmitted, or translated in any form or by any means, electronic, mechanical, manual, optical, or otherwise, without the prior written permission of anyone. For more information please visit http://www.openwatcom.org/ Portions of this manual are reprinted with permission from Tenberry Software, Inc. ii Preface The Watcom FORTRAN 77 Programmer's Guide includes the following major components: · DOS Programming Guide · The DOS/4GW DOS Extender · Windows 3.x Programming Guide · Windows NT Programming Guide · OS/2 Programming Guide · Novell NLM Programming Guide · Mixed Language Programming · Common Problems Acknowledgements This book was produced with the Watcom GML electronic publishing system, a software tool developed by WATCOM. In this system, writers use an ASCII text editor to create source files containing text annotated with tags. These tags label the structural elements of the document, such as chapters, sections, paragraphs, and lists. The Watcom GML software, which runs on a variety of operating systems, interprets the tags to format the text into a form such as you see here. Writers can produce output for a variety of printers, including laser printers, using separately specified layout directives for such things as font selection, column width and height, number of columns, etc.
    [Show full text]
  • COMPILING FUNCTIONAL PROGRAMMING CONSTRUCTS to a LOGIC ENGINE by Harvey Abramson and Peter Ludemann Technical Report 86-24 November 1986
    COMPILING FUNCTIONAL PROGRAMMING CONSTRUCTS TO A LOGIC ENGINE by Harvey Abramson and Peter Ludemann Technical Report 86-24 November 1986 Compiling Functional Programming Constructs to a Logic Engine Harvey Abramson t and Peter Ltidemann:I: Department of Computer Science University of British Columbia Vancouver, B.C., Canada V6T 1W5 Copyright © 1986 Abstract In this paper we consider how various constructs used in functional programming can be efficiently translated to code for a Prolog engine (designed by Ltidemann) similar in spirit but not identical to the Warren machine. It turns out that this Prolog engine which contains a delay mechanism designed to permit co­ routining and sound implementation of negation is sufficient to handle all common functional programming constructs; indeed, such a machine has about the same efficiency as a machine designed specifically for a functional programming language. This machine has been fully implemented. t Present address: Department of Computer Science, Bristol University, Bristol, England . f Present address: IBM Canada Ltd., 1 Park Centre, 895 Don Mills Road, North York, Ontario, Canada M3C 1W3 The proposals for combining the two paradigms Compiling Functional Programming have been roughly classified in [BoGi86] as being Constructs to a Logic Engine either functional plus logic or logic plus functional. Harvey Abramson t and Peter Ltidemanni In the former approach, invertibility, nondeterminism Department of Computer Science and unification are added to some higher order functional language; in the latter approach, first-order University of British Columbia functions are added to a first-order logic with an Vancouver, B.C., Canada V6T lWS equality theory. We do not take any position as to Copyright© 1986 which approach is best, but since a logic machine already deals with unification, nondeterminism and invertibility, we have taken, from an implementation Abstract viewpoint, the logic plus functional approach.
    [Show full text]
  • Parameter Passing, Generics, Exceptions
    Lecture 9: Parameter Passing, Generics and Polymorphism, Exceptions COMP 524 Programming Language Concepts Stephen Olivier February 12, 2008 Based on notes by A. Block, N. Fisher, F. Hernandez-Campos, and D. Stotts The University of North Carolina at Chapel Hill Parameter Passing •Pass-by-value: Input parameter •Pass-by-result: Output parameter •Pass-by-value-result: Input/output parameter •Pass-by-reference: Input/output parameter, no copy •Pass-by-name: Effectively textual substitution The University of North Carolina at Chapel Hill 2 Pass-by-value int m=8, i=5; foo(m); print m; # print 8 proc foo(int b){ b = b+5; } The University of North Carolina at Chapel Hill 3 Pass-by-reference int m=8; foo(m); print m; # print 13 proc foo(int b){ b = b+5; } The University of North Carolina at Chapel Hill 4 Pass-by-value-result int m=8; foo(m); print m; # print 13 proc foo(int b){ b = b+5; } The University of North Carolina at Chapel Hill 5 Pass-by-name •Arguments passed by name are re-evaluated in the caller’s referencing environment every time they are used. •They are implemented using a hidden-subroutine, known as a thunk. •This is a costly parameter passing mechanism. •Think of it as an in-line substitution (subroutine code put in-line at point of call, with parameters substituted). •Or, actual parameters substituted textually in the subroutine body for the formulas. The University of North Carolina at Chapel Hill 6 Pass-by-name array A[1..100] of int; array A[1..100] of int; int i=5; int i=5; foo(A[i], i); foo(A[i]); print A[i]; #print A[6]=7
    [Show full text]
  • Microsoft Palladium
    Microsoft Palladium: A Business Overview Combining Microsoft Windows Features, Personal Computing Hardware, and Software Applications for Greater Security, Personal Privacy, and System Integrity by Amy Carroll, Mario Juarez, Julia Polk, Tony Leininger Microsoft Content Security Business Unit June 2002 Legal Notice This is a preliminary document and may be changed substantially prior to final commercial release of the software described herein. The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication. This White Paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE INFORMATION IN THIS DOCUMENT. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation. Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property. Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, e-mail address, logo, person, place or event is intended or should be inferred.
    [Show full text]
  • Programming Languages
    ◦ ◦◦◦ TECHNISCHE UNIVERSITAT¨ MUNCHEN¨ ◦◦◦◦ ◦ ◦ ◦◦◦ ◦◦◦◦ ¨ ¨ ◦ ◦◦ FAKULTAT FUR INFORMATIK Programming Languages Multiple Inheritance Dr. Axel Simon and Dr. Michael Petter Winter term 2012 Multiple Inheritance 1 / 29 Outline Inheritance Principles 1 Interface Inheritance 2 Implementation Inheritance 3 Liskov Substition Principle and Shapes C++ Object Heap Layout 1 Basics 2 Single-Inheritance Excursion: Linearization 3 Virtual Methods 1 Ambiguous common parents 2 Principles of Linearization C++ Multiple Parents Heap Layout 3 Linearization algorithm 1 Multiple-Inheritance 2 Virtual Methods 3 Common Parents Discussion & Learning Outcomes Multiple Inheritance 2 / 29 “Wouldn’t it be nice to inherit from several parents?” Multiple Inheritance Inheritance Principles 3 / 29 Interface vs. Implementation inheritance The classic motivation for inheritance is implementation inheritance Code reusage Child specializes parents, replacing particular methods with custom ones Parent acts as library of common behaviours Implemented in languages like C++ or Lisp Code sharing in interface inheritance inverts this relation Behaviour contract Child provides methods, with signatures predetermined by the parent Parent acts as generic code frame with room for customization Implemented in languages like Java or C# Multiple Inheritance Inheritance Principles 4 / 29 Interface Inheritance DropDownList refresh() ActionObserver MyDDL changed() changed() Multiple Inheritance Inheritance Principles 5 / 29 Implementation inheritance PowerShovel FrontLoader actuate() actuate()
    [Show full text]
  • Getting Started Guide
    Getting Started Guide P/N 066450-004 EZBuilder Intermec Technologies Corporation 6001 36th Avenue West P.O. Box 4280 Everett, WA 98203-9280 U.S. technical and service support: 1-800-755-5505 U.S. media supplies ordering information: 1-800-227-9947 Canadian technical and service support: 1-800-687-7043 Canadian media supplies ordering information: 1-800-267-6936 Outside U.S. and Canada: Contact your local Intermec service supplier. The information contained herein is proprietary and is provided solely for the purpose of allowing customers to operate and/or service Intermec manufactured equipment and is not to be released, reproduced, or used for any other purpose without written permission of Intermec. Information and specifications in this manual are subject to change without notice. 2000 by Intermec Technologies Corporation All Rights Reserved The word Intermec, the Intermec logo, EZBuilder, JANUS, IRL, Trakker Antares, Adara, Duratherm, Precision Print, PrintSet, Virtual Wedge, and CrossBar are either trademarks or registered trademarks of Intermec Technologies Corporation. Microsoft, Active X, Visual C++, Windows, Win32s, the Windows logo, and Windows NT are either trademarks or registered trademarks of Microsoft Corporation. Throughout this manual, trademarked names may be used. Rather than put a trademark (™ or ®) symbol in every occurrence of a trademarked name, we state that we are using the names only in an editorial fashion, and to the benefit of the trademark owner, with no intention of infringement. EZBuilder Getting Started Guide Welcome to EZBuilder EZBuilder™ is a fast, easy-to-use development tool for creating applications that run on Trakker Antares®, T2090, and 6400 terminals.
    [Show full text]
  • Subroutines and Control Abstraction8 8.3.2 Call by Name
    Subroutines and Control Abstraction8 8.3.2 Call by Name Call by name implements the normal-order argument evaluation described in Section 6.6.2. A call-by-name parameter is re-evaluated in the caller’s referencing environment every time it is used. The effect is as if the called routine had been textually expanded at the point of call, with the actual parameter (which may be a complicated expression) replacing every occurrence of the formal parameter. To avoid the usual problems with macro parameters, the “expansion” is defined to include parentheses around the replaced parameter wherever syntactically valid, and to make “suitable systematic changes” to the names of any formal parame- ters or local identifiers that share the same name, so that their meanings never conflict [NBB+63, p. 12]. Call by name is the default in Algol 60; call by value is available as an alternative. In Simula call by value is the default; call by name is the alternative. Toimplement call by name,Algol 60 implementations pass a hidden subroutine that evaluates the actual parameter in the caller’s referencing environment. The hidden routine is usually called a thunk.2 In most cases thunks are trivial. If an actual parameter is a variable name, for example, the thunk simply reads the EXAMPLE 8.68 variable from memory. In some cases, however, a thunk can be elaborate. Perhaps Jensen’s device the most famous occurs in what is known as Jensen’s device, named after Jørn Jensen [Rut67]. The idea is to pass to a subroutine both a built-up expression and one or more of the variables used in the expression.
    [Show full text]
  • DLCC Software Catalog
    Daniel's Legacy Computer Collections Software Catalog Category Platform Software Category Title Author Year Media Commercial Apple II Integrated Suite Claris AppleWorks 2.0 Claris Corporation and Apple Computer, Inc. 1987 800K Commercial Apple II Operating System Apple IIGS System 1.0.2 --> 1.1.1 Update Apple Computer, Inc. 1984 400K Commercial Apple II Operating System Apple IIGS System 1.1 Apple Computer, Inc. 1986 800K Commercial Apple II Operating System Apple IIGS System 2.0 Apple Computer, Inc. 1987 800K Commercial Apple II Operating System Apple IIGS System 3.1 Apple Computer, Inc. 1987 800K Commercial Apple II Operating System Apple IIGS System 3.2 Apple Computer, Inc. 1988 800K Commercial Apple II Operating System Apple IIGS System 4.0 Apple Computer, Inc. 1988 800K Commercial Apple II Operating System Apple IIGS System 5.0 Apple Computer, Inc. 1989 800K Commercial Apple II Operating System Apple IIGS System 5.0.2 Apple Computer, Inc. 1989 800K Commercial Apple II Reference: Programming ProDOS Basic Programming Examples Apple Computer, Inc. 1983 800K Commercial Apple II Utility: Printer ImageWriter Toolkit 1.5 Apple Computer, Inc. 1984 400K Commercial Apple II Utility: User ProDOS User's Disk Apple Computer, Inc. 1983 800K Total Apple II Titles: 12 Commercial Apple Lisa Emulator MacWorks 1.00 Apple Computer, Inc. 1984 400K Commercial Apple Lisa Office Suite Lisa 7/7 3.0 Apple Computer, Inc. 1984 400K Total Apple Lisa Titles: 2 Commercial Apple Mac OS 0-9 Audio Audioshop 1.03 Opcode Systems, Inc. 1992 800K Commercial Apple Mac OS 0-9 Audio Audioshop 2.0 Opcode Systems, Inc.
    [Show full text]
  • Design, Semantics and Implementation of the Ptolemy
    Computer Science Technical Reports Computer Science Summer 7-31-2015 Design, Semantics and Implementation of the Ptolemy Programming Language: A Language with Quantified yT ped Events Hridesh Rajan Iowa State University, [email protected] Gary T. Leavens University of Central Florida Follow this and additional works at: http://lib.dr.iastate.edu/cs_techreports Part of the Programming Languages and Compilers Commons Recommended Citation Rajan, Hridesh and Leavens, Gary T., "Design, Semantics and Implementation of the Ptolemy Programming Language: A Language with Quantified Typed Events" (2015). Computer Science Technical Reports. 376. http://lib.dr.iastate.edu/cs_techreports/376 This Article is brought to you for free and open access by the Computer Science at Iowa State University Digital Repository. It has been accepted for inclusion in Computer Science Technical Reports by an authorized administrator of Iowa State University Digital Repository. For more information, please contact [email protected]. Design, Semantics and Implementation of the Ptolemy Programming Language: A Language with Quantified yT ped Events Abstract Implicit invocation (II) and aspect-oriented (AO) languages provide software designers with related but distinct mechanisms and strategies for decomposing programs into modules and composing modules into systems. II languages have explicitly announced events that run registered observer methods. AO languages have implicitly announced events that run method-like but more powerful advice. A limitation of II languages is their inability to refer to a large set of events succinctly. They also lack the expressive power of AO advice. Limitations of AO languages include potentially fragile dependence on syntactic structure that may hurt maintainability, and limits on the available set of implicit events and the reflective contextual information available.
    [Show full text]