Mbasic Vt180, Vs.21 Basic-80 Reference Manual Aa-P226a

Total Page:16

File Type:pdf, Size:1020Kb

Mbasic Vt180, Vs.21 Basic-80 Reference Manual Aa-P226a MBASIC VT180, VS.21 BASIC-80 REFERENCE MANUAL AA-P226A-TV MBASIC VT180, VS.21 BASIC-80 REFERENCE MANUAL AA-P226A-TV developed by MICROSOFT CORPORATION Bellevue, Washing ton DIGITAL EQUIPMENT CORPORATION Maynard, Massachusetts The information in this document is subject to change without notice and should not be construed as a com­ mitment by Digital Equipment Corporation. Digital Equipment Corporation assumes no responsibility for any errors that may appear in this document. The software described in this document is furnished under a license and may only be used or copied in accordance with the terms of such license. No responsibility is assumed for the use or reliability of software by DIGITAL or its affiliated companies. Copyright G 1979, MICROSOFT CORPORATION Licensed to DIGITAL EQUIPMENT CORPORATION, Maynard, Massachusetts. The following are trademarks of Digital Equipment Corporation: ASSIST DIGITAL RSTS COMPUTER LABS EDUsystem RSX COMTEX FLIP CHIP RTS-8 DATATRIEVE FOCAL SBI DDT lAS TMS-II DEC INDAC TRAX . DECCOMM ITPS-IO TYPESET-8 DECmate LAB-8 TYPESET-II DECnet MASSBUS UNIBUS DECSYSTEM-IO OMNIBUS VAX DECSYSTEM-20 OS/8 VMS DECtape PDP VT DECUS PDT Work Processor DECwriter PHA VTl80 DIBOL CP/M is a trademark of Digital Research PRODUCT EXCEPTION REPORTING SERVICE: If, prior to SEPTEMBER 1, 1983, the customer encounters a problem wi th the software. as orig inally furnished a Product Exception Report may be sub~itted to: Digital Equipment Corporation BOX A 146 Main Street Maynard, MA 01754 Throug h the software authors, DIGITAL wi 11, wi thout add i tional charg e, respond to the reported error in the current unaltered release of the software by issuing any known correction informa­ tion to the customer reporting the problem and/or issuing notice of the availability of corrected code. However, DIGITAL makes no representations or guarantees that such a response will be forth­ coming and DIGITAL assumes no responsibility or liability for such a response or the accuracy thereof. WARRANTY: NONE. THIS SOFTWARE PRODUCT IS PROVIDED "AS IS". IDmDomo EXTERNAL APPLICATION SOFTWARE LIBRARY PAGE OF _EASE TYPE PRODUCT EXCEPTION REPORT (PER) -- -- ROGRAM OR DOCUMENT TITLE lOA NUMBER 10PERATING SYSTEM IVERSION IDATE AN THE PROBLEM BE REPRODUCED AT WILL? YES 0 NO 0 PU TYPE \MEMORY SIZE IDISTRIBUTION MEDIUM \SYS DEVICE I ATTACHMENTS I IMAGTAPE 0 FLOPPY DISKS 0 LISTING 0 DECTAPE II 0 ALL SUBMISSIONS BECOME THE PROPERTY OF DIGITAL EQUIPMENT CORPORATION Mail To: NAME: Digital Equipment Corporation FIRM: Box A 146 Main Street Maynard, MA 01754 "If received prior to the PER expiration date of the product, Digital will, thru the product author(s). respond to a reported error in the current ADDRESS: unaltered release of the software by issuing any known correction information to the customer reporting the problem and/or issuing CUST. NO: notice of the availability of corrected code. However, Digital makes no representations or guarantees that such a response will be forthcoming and Digital assumes no responsibility or liability for such a response U!3MITTED BY: PHONE: or the accuracy thereof. Except as specified in this paragraph, Digital does not support or maintain the software." lATE RECEIVED (MAIL) \ DATE TO AUTHOR \ DATE RECEIVED FROM AUTHOR \ DATE ANSWERED I-01613-07-0000(3E9) basic-80 reference manual This manual is a reference for Microsoft's BASIC-80 language, release 5.0 and later. There are significant differences between the 5.0 release of BASIC-80 and the previous releases (release 4.51 and earlier). If you have programs written under a previous release of BASIC-80, check Appendix A for new features in 5.0 that may affect execution. Information in this document is subject to change without notice and does not represent a commitment on the part of Microsoft. The software described in this document is furnished under a license agreement or non-disclosure agreement. The software may be used or copied only in accordance with the terms of the agreement. (C) Microsoft, 1979 8101-520-06 BASIC-80 Reference Manual CONTENTS INTRODUCTION PAGE CHAPTER 1 General Information about BASIC-80 1-1 CHAPTER 2 BASIC-80 Commands and Statements 2-1 CHAPTER 3 BASIC-80 Functions 3-1 APPENDIX A New Features in BASIC-80. Release 5.0 A-I APPENDIX B BASIC-80 Disk I/O B-1 APPENDIX C Assembly Language Subroutines C-l APPENDIX D BASIC-80 with the CP/M Operating System D-l APPENDIX E Converting Programs to BASIC-80 E-l APPENDIX F Summary of Error Codes and Error Messages F-l APPENDIX G Mathematical Functions G-l APPENDIX H ASCII Character Codes H-l INDEX I-I Introduction BASIC-80 is the most extensive implementation of BASIC available for the 8080 and Z80 microprocessors. In its fifth major release (Release 5.0), BASIC-80 meets the ANSI qualifications for BASIC, as set forth in document BSRX3.60-1978. Each release of BASIC-80 consists of three upward compatible versions: 8K, Extended and Disk. This manual is a reference for all three versions of BASIC-80, release 5.0 and later. This manual is also a reference for Microsoft BASIC-86 and the Microsoft BASIC Compiler. BASIC-86 is currently available in Extended and Disk Standalone versions, which are comparable to the BASIC-80 Extended and Disk Standalone versions. There are significant differences between the 5.0 release of BASIC-80 and the previous releases (release 4.51 and earlier). If you have programs written under a previous release of BASIC-80, check Appendix A for new features in 5.0 that may affect execution. The manual is divided into three large chapters plus a number of appendices. Chapter 1 covers a variety of topics, largely pertaining to information representation when using BASIC-80. Chapter 2 contains the syntax and semantics of every command and statement in BASIC-80, ordered alphabetically. Chapter 3 describes all of BASIC-80~s intrinsic functions, also ordered alphabetically. The appendices contain information pertaining to individual operating systems: plus lists of error messages, ASCII codes, and math functions: and helpful information on assembly language subroutines and disk I/O. Page 1-1 CHAPTER 1 GENERAL INFORMATION ABOUT BASIC-SO 1.1 INITIALIZATION The procedure for initialization will vary with different implementations of BASIC-SO. Check the appropriate appendix at the back of this manual to determine how BASIC-SO is initialized with your operating system. 1.2 MODES OF OPERATION When BASIC-SO is initialized, it types the prompt "Ok". "Ok" means BASIC-SO is at command level, that is, it is ready to accept commands. At this point, BASIC-SO may be used in either of two modes: the direct mode or the indirect mode. In the direct mode, BASIC statements and commands are not preceded by line numbers. They are executed as they are entered. Results of arithmetic and logical operations may be displayed immediately and stored for later use, but the instructions themselves are lost after execution. This mode is useful for debugging and for using BASIC as a "calculator" for quick computations that do not require a complete program. The indirect mode is the mode used for entering programs. Program lines are preceded by line numbers and are stored in memory. The program stored in memory is executed by entering the RUN command. 1.3 LINE FORMAT Program lines in a BASIC program have the following format (square brackets indicate optional) : nnnnn BASIC statement[:BASIC statement .•. ] <carriage return> GENERAL INFORMATION ABOUT BASIC-80 Page 1-2 At the proqrammer"'s option, more than one BASIC statement may be placed on a line, but each statement on a line must be separated from the last by a colon. A BASIC program line always begins with a line number, ends with a carriage return, and may contain a maximum of: 72 characters in 8K BASIC-80 255 characters in Extended and Disk BASIC-80. In Extended and Disk versions, it is possible to extend a logical line over more than one physical line by use of the terminal"'s <line feed> key. <Line feed> lets you continue typing a logical line on the next physical line without entering a <carriage return>. (In the 8K version, <line feed> has no effect.) 1.3.1 Line Numbers Every BASIC program line begins with a line number. Line numbers indicate the order in which the program lines are stored in memory and are' also used as references when branching and editing. Line numbers must be in the range a to 65529. In the Extendedi and Disk versions, a per iod (.) may be used in EDIT, LIST, AUTO and DELETE commands to refer to the current line. GENERAL INFORMATION ABOUT BASIC-SO Page 1-3 1.4 CHARACTER SET The BASIC-SO character set is comprised of alphabetic characters, numeric characters and special characters. The alphabetic characters in BASIC-SO are the upper case and lower case letters of the alphabet. The numeric characters in BASIC-SO are the digits 0 through 9. The following special characters and terminal keys are recognized by BASIC-SO: Character -Name Blank = Equal sign or assignment symbol + Plus sign Minus sign * Asterisk or multiplication symbol /,. Slash or division symbol Up arrow or exponentiation symbol ( Left parenthesis ) Right parenthesis % Percent i Number (or pound) sign $ Dollar sign Exclamation point [ Left bracket ] Right bracket , Comma . Period or decimal point ~ Single quotation mark (apostrophe) Semicolon Colon & Ampersand ? Question mark < Less than > Greater than \ Backs1ash or integer division symbol @ At-sign Underscore <rubout> Deletes last character typed. <escape> Escapes Edit Mode subcommands. See Section 2.16. <tab> Moves print position to next tab stop. Tab stops are every eight columns.
Recommended publications
  • Hacker's Handbook for Ringzer0 Training, by Steve Lord
    Hacker’s Handbook For Ringzer0 Training, by Steve Lord This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Copyright ©2021 Raw Hex Ltd. All Rights Reserved. Retro Zer0 is a trademark of Ring Zer0 Training. Raw Hex is a trademark of Raw Hex Ltd. All other trademarks are the property of their respective owners. Raw Hex Ltd reserve the right to make changes or improvements to equipment, software and documentation herein described at any time and without notice. Notice: Please be advised that your Retro Zer0 has no warranty, and that tampering with the internal hardware and software of your Ring Zer0 is widely encouraged as long as you do so with appropriate regard to safety. Contents 1 Preface 5 1.1 Safety ........................... 6 1.2 Understanding This Document ............ 6 2 Before You Start 7 2.1 Check You Have Everything .............. 7 2.2 Back Up The SD Card ................. 8 2.3 Connecting Up Your Retro Zer0 ............ 8 2.4 Powering Up ....................... 10 2.5 Resetting Your Retro Zer0 . 10 2.6 Powering Down ..................... 10 3 First Steps 11 3 4 CONTENTS 3.1 Testing The Keyboard . 11 3.2 Using CP/M ....................... 12 3.3 Would You Like To Play A Game? . 14 3.4 MultiCPM Extras ..................... 17 3.5 Useful Tools ....................... 19 3.6 What’s On The Card? . 20 3.7 Putting It All Together . 23 3.8 Where To Read More . 25 4 Being Productive With Retro Zer0 27 4.1 WordStar .........................27 4.2 Supercalc .........................30 4.3 DBase ...........................32 4.4 Microsoft BASIC .....................32 4.5 Turbo Pascal .......................34 4.6 Forth 83 .........................36 4.7 ZDE ............................38 4.8 Z80 Assembler .....................39 4.9 Hi-Tech C .........................43 4.10 XLisp ...........................46 CONTENTS 5 4.11 Installing New Software .
    [Show full text]
  • BASIC Programs for Computing Displacements, Strains, and Tilts from Quadrilateral Measurements
    DEPARTMENT OF THE INTERIOR U.S. GEOLOGICAL SURVEY BASIC programs for computing displacements, strains, and tilts from quadrilateral measurements by Arvid M. Johnson and r> Rex L. Baum Open-File Report 87-3^3 Any use of trade names in this report is for descriptive purposes only and does not imply endorsement by the U.S. Geological Survey. This report is preliminary and has not been reviewed for conformity with U.S. Geological Survey editorial standards. University of Cincinnati (M.L. 13) U.S. Geological Survey Cincinnati, Ohio M5221 Box 250H6, MS 966 Denver, CO 80225 1987 INTRODUCTION Since 1983, we have been using quadrilaterals defined by survey stakes (fig. 1) to measure displacements, strains, and tilts at the surfaces of landslides. A companion paper will describe the use of quadrilaterals and give derivations of the equations needed to compute displacements, strains, and tilts. This report provides user instructions for, and listings of, BASIC programs that perform the computations. It is assumed that the reader is familiar with MBASIC and CP/M. However, we have tried to make the user instructions complete and step by step so that the average user can run the programs successfully. B (a) (b) Figure 1. Quadrilateral, (a) Isometric view showing survey stakes on a hillside, (b) Plan view. By convention, stake A has the highest elevation and the other stakes are named B, C, and D in clockwise rotation from A. In the field, the slope distance between each pair of stakes and the elevation of each stake is measured. The azimuth of line AC is used to orient the data.
    [Show full text]
  • While Statement in C
    While Statement In C EnricoIs Reg alwaysdisheartening deplete or his novel aspects when chagrined luminesced disputatiously, some crayfishes he orbits clump so temporizingly? grindingly. Solid Ring-necked and comose Bennet Brendan tarnishes never tensehalf-and-half his Stuttgart! while Thank you use a counter is a while loop obscures the condition which is evaluated to embed videos in while c program C while loops statement allows to repeatedly run at same recipient of code until a wrap is met while loop is empty most basic loop in C programming while loop. We then hand this variable c in the statement block and represent your value for each. While adultery in C Set of instructions given coil the compiler to night set of statements until condition becomes false is called loops. If it is negative number added to the condition in c language including but in looping structures, but is executed infinite loop! While Loop Definition Example & Results Video & Lesson. While talking in C Know Program. What is the while eternal in C? A while loop around loop continuously and infinitely until the policy inside the parenthesis becomes false money must guard the. C while and dowhile Loop Programiz. Programming While Loop. The widow while redeem in the C language is basically a post tested loop upon the execution of several parts of the statements can be repeated by reckless use children do-while. 43 Loops Applications in C for Engineering Technology. Do it Loop in C Programming with Examples Phptpoint. Statements and display control C Tutorials Cpluspluscom. Do while just in c example program.
    [Show full text]
  • MIC5161 Win 2003 Launch V6
    Microsoft Windows Server 2003 and Microsoft Visual Studio .NET 2003 Launch Guide Do more with less. 1 Contents Introduction 2 Introducing Microsoft® Windows® Server 2003 4 Windows Server 2003 Case Studies 10 Introducing Microsoft® Visual Studio® .NET 2003 26 Visual Studio .NET 2003 Case Studies 41 Australian .NET Connected Partners 47 Microsoft® SQL Server™ 52 Microsoft Exchange Server 53 Windows Server 2003 and Visual Studio .NET 2003 Launch Sponsors 55 Platform Partner 56 Platinum Sponsors 61 Gold Sponsors 81 Silver Sponsors 96 Australian Windows Server 2003 JDP 100 Microsoft Gold Certified Partners 102 2 3 Welcome to the launch of Windows Server 2003! This is an exciting time for In my ten or more years in the Australian developer community, the combination Microsoft, our partners and customers, as this is unquestionably the most of Microsoft Windows Server 2003 and Microsoft Visual Studio® .NET 2003 is customer-focused Windows Server release yet. The reality of today’s IT environment the most exciting launch I have ever been involved with. Last February, Microsoft is the demand to do more with technology and, at the same time, do it with reset the bar for innovation and productivity with a new development paradigm for less cost. Over the last two years, we have spent time with customers using building Web Services and applications – Visual Studio .NET. This year, we build Microsoft® Windows® 2000 Server and Windows NT® Server 4.0 to really on that momentum by offering an entire development platform for the building understand what it would take to enable them do a lot more with Windows Server and execution of those applications.
    [Show full text]
  • Scanned Document
    OJ )> Vl () 0 ,0 ,m' I 1-V II&JS mm&Radio4 I nederlandse ornroep stichting I THE CHIP SHOP BASICODE2 mmmRadio4 - Broadcasting Support Services CONTENTS ©NOS nederlandse omroep stichting, Hilversum, Netherland 1. INTRODUCTION 5 ISBN 0-906965-14-4 2. HOW TO USE BASICODE-2 7 This edition first published by Broadcasting Support Services January 1984 3. BASICODE- THE SPECIFICATIONS 9 THE CHIP SHOP BBC Radio4 4. BASICODE-2 PROTOCOL 12 British Broadcasting Corporation Portland Place 5. APPLE II & lie 26 London W1A 1AA 6. BBC (A& B) 29 All rights reserved. This handbook and the accompanying computer programs are copyright. No part of this handbook or 7. COMMODORE COMPUTERS 31 the accompanying computer programs may be reproduced, 8. SHARP MZSOA 36 translated, copied or transmitted by any means whatsoever without the prior written permission of the copyright owners. 9. SINCLAIR ZX81 37 The publisher assumes no responsibility for errors, nor liability 10. TANDY TRS-80 & VIDEOGENIE 41 for loss or damage, however caused, arising from the use of the Basicode 2 kit. 11. THE FUTURE 47 The BASICODE-2 kit is available for £3.95 frorr:: Broadcasting Support Services P.O. Box? London W3 6XJ Please make cheques or postal orders payable to Broadcasting Support Services. Published for The Chip Shop, Radio 4, by Broadcasting Support Services- an independent educational charity providing follow­ up services for viewers and listeners. Introduction Chapter One BASICODE-2 INTRODUCTION BASICODE has been developed by the radio programme Hobbyscoop This book and the accompanying cassette contain the details of NOS­ which is broadcast weekly by Nederlanse Omroep Stichting (NOS), BASICODE.
    [Show full text]
  • Detecting and Escaping Infinite Loops Using Bolt
    Detecting and Escaping Infinite Loops Using Bolt by Michael Kling Submitted to the Department of Electrical Engineering and Computer Science in partial fulfillment of the requirements for the degree of Masters of Engineering in Electical Engineering and Computer Science at the MASSACHUSETTS INSTITUTE OF TECHNOLOGY February 2012 c Massachusetts Institute of Technology 2012. All rights reserved. Author.............................................................. Department of Electrical Engineering and Computer Science February 1, 2012 Certified by. Martin Rinard Professor Thesis Supervisor Accepted by . Prof. Dennis M. Freeman Chairman, Masters of Engineering Thesis Committee 2 Detecting and Escaping Infinite Loops Using Bolt by Michael Kling Submitted to the Department of Electrical Engineering and Computer Science on February 1, 2012, in partial fulfillment of the requirements for the degree of Masters of Engineering in Electical Engineering and Computer Science Abstract In this thesis we present Bolt, a novel system for escaping infinite loops. If a user suspects that an executing program is stuck in an infinite loop, the user can use the Bolt user interface, which attaches to the running process and determines if the program is executing in an infinite loop. If that is the case, the user can direct the interface to automatically explore multiple strategies to escape the infinite loop, restore the responsiveness of the program, and recover useful output. Bolt operates on stripped x86 and x64 binaries, analyzes both single-thread and multi-threaded programs, dynamically attaches to the program as-needed, dynami- cally detects the loops in a program and creates program state checkpoints to enable exploration of different escape strategies. This makes it possible for Bolt to detect and escape infinite loops in off-the-shelf software, without available source code, or overhead in standard production use.
    [Show full text]
  • Mbasic Vt180, Vs.21 Getting Started with Mbasic Vt180
    MBASIC VT180, VS.21 GETTING STARTED WITH MBASIC VT180 AA-P22SA-TV MBASIC VTlS0, VS.21 GETTING STARTED WITH MBASIC VT180 AA-P22SA-TV developed by MICROSOFT CORPORATION Bellevue, Washing ton DIGITAL EQUIPMENT CORPORATION Maynard, Massachusetts / .. The information in this document is subject to change without notice and should not be construed as a com­ mitment by Digital Equipment Corporation. Digital Equipment Corporation assumes no responsibility for any errors that may appear in this document. The software described in this document is furnished under a license and may only be used or copied in accordance with the terms of such license. No responsibility is assumed for the. use or reliability of software by DIGITAL or its affiliated companies. Copyr ig ht @ 1981, MICROSOFT CORPORATION Licensed to DIGITAL EQUIPMENT CORPORATION, Maynard, Massachusetts. The following are trademarks of Digital Equipment Corporation: ASSIST DIGITAL RSTS COMPUTER LABS EDUsystem RSX COMTEX FLIP CHIP RTS-8 DATATRIEVE FOCAL SBI DDT lAS TMS-ll DEC INDAC TRAX DECCOMM ITPS-IO TYPESET-8 DECmate LAB-8 TYPESET-II DECnet MASSBUS UNIBUS DECSYSTEM-IO OMNIBUS VAX DECSYSTEM-20 OS/8 VMS DECtape PDP VT DECUS PDT Work Processor DECwriter PHA VT180 DIBOL CP/M is a trademark of Digital Research PRODUCT EXCEPTION REPORTING SERVICE: If, prior to SEPTEMBER 1, 1983, the customer encounters a problem wi th the software as orig inally furnished, a Product Exception Report may be submitted to: Digital Equipment Corporation BOX A 146 Main Street Maynard, MA 01754 Through the software authors, DIGITAL will, wi thout addi tional charg e, respond to the reported error in the current unaltered release of the software by issuing any known correction informa­ tion to the customer reporting the problem and/or issuing notice of the availability of corrected code.
    [Show full text]
  • CS 161, Lecture 8: Error Handling and Functions – 29 January 2018 Revisit Error Handling
    CS 161, Lecture 8: Error Handling and Functions – 29 January 2018 Revisit Error Handling • Prevent our program from crashing • Reasons programs will crash or have issues: • Syntax Error – prevents compilation, the programmer caused this by mistyping or breaking language rules • Logic Errors – the code does not perform as expected because the underlying logic is incorrect such as off by one, iterating in the wrong direction, having conditions which will never end or be met, etc. • Runtime Errors – program stops running due to segmentation fault or infinite loop potentially caused by trying to access memory that is not allocated, bad user input that was not handled, etc. check_length • The end of a string is determined by the invisible null character ‘\0’ • while the character in the string is not null, keep counting Assignment 3 Notes • Allowed functions: • From <string>: .length(), getline(), [], += • From <cmath>: pow() • Typecasting allowed only if the character being converted fits the stated criterion (i.e. character was confirmed as an int, letter, etc.) • ASCII Chart should be used heavily http://www.asciitable.com/ Debugging Side Bar • Read compiler messages when you have a syntax error • If you suspect a logic error -> print everything! • Allows you to track the values stored in your variables, especially in loops and changing scopes • Gives you a sense of what is executing when in your program Decomposition • Divide problem into subtasks • Procedural Decomposition: get ready in the morning, cooking, etc. • Incremental Programming:
    [Show full text]
  • Automatic Repair of Infinite Loops
    Automatic Repair of Infinite Loops Sebastian R. Lamelas Marcote Martin Monperrus University of Buenos Aires University of Lille & INRIA Argentina France Abstract Research on automatic software repair is concerned with the develop- ment of systems that automatically detect and repair bugs. One well-known class of bugs is the infinite loop. Every computer programmer or user has, at least once, experienced this type of bug. We state the problem of repairing infinite loops in the context of test-suite based software repair: given a test suite with at least one failing test, generate a patch that makes all test cases pass. Consequently, repairing infinites loop means having at least one test case that hangs by triggering the infinite loop. Our system to automatically repair infinite loops is called Infinitel. We develop a technique to manip- ulate loops so that one can dynamically analyze the number of iterations of loops; decide to interrupt the loop execution; and dynamically examine the state of the loop on a per-iteration basis. Then, in order to synthesize a new loop condition, we encode this set of program states as a code synthesis problem using a technique based on Satisfiability Modulo Theory (SMT). We evaluate our technique on seven seeded-bugs and on seven real-bugs. Infinitel is able to repair all of them, within seconds up to one hour on a standard laptop configuration. 1 Introduction Research on automatic software repair is concerned with the development of sys- tems that automatically detect and repair bugs. We consider as bug a behavior arXiv:1504.05078v1 [cs.SE] 20 Apr 2015 observed during program execution that does not correspond to the expected one.
    [Show full text]
  • Chapter 6 Flow of Control
    Chapter 6 Flow of Control 6.1 INTRODUCTION “Don't you hate code that's In Figure 6.1, we see a bus carrying the children to not properly indented? school. There is only one way to reach the school. The Making it [indenting] part of driver has no choice, but to follow the road one milestone the syntax guarantees that all after another to reach the school. We learnt in Chapter code is properly indented.” 5 that this is the concept of sequence, where Python executes one statement after another from beginning to – G. van Rossum the end of the program. These are the kind of programs we have been writing till now. In this chapter Figure 6.1: Bus carrying students to school » Introduction to Flow of Control Let us consider a program 6-1 that executes in » Selection sequence, that is, statements are executed in an order in which they are written. » Indentation The order of execution of the statements in a program » Repetition is known as flow of control. The flow of control can be » Break and Continue implemented using control structures. Python supports Statements two types of control structures—selection and repetition. » Nested Loops 2021-22 Ch 6.indd 121 08-Apr-19 12:37:51 PM 122 COMPUTER SCIENCE – CLASS XI Program 6-1 Program to print the difference of two numbers. #Program 6-1 #Program to print the difference of two input numbers num1 = int(input("Enter first number: ")) num2 = int(input("Enter second number: ")) diff = num1 - num2 print("The difference of",num1,"and",num2,"is",diff) Output: Enter first number 5 Enter second number 7 The difference of 5 and 7 is -2 6.2 SELECTION Now suppose we have `10 to buy a pen.
    [Show full text]
  • Infinite Loop Space Theory
    BULLETIN OF THE AMERICAN MATHEMATICAL SOCIETY Volume 83, Number 4, July 1977 INFINITE LOOP SPACE THEORY BY J. P. MAY1 Introduction. The notion of a generalized cohomology theory plays a central role in algebraic topology. Each such additive theory E* can be represented by a spectrum E. Here E consists of based spaces £, for / > 0 such that Ei is homeomorphic to the loop space tiEi+l of based maps l n S -» Ei+,, and representability means that E X = [X, En], the Abelian group of homotopy classes of based maps X -* En, for n > 0. The existence of the E{ for i > 0 implies the presence of considerable internal structure on E0, the least of which is a structure of homotopy commutative //-space. Infinite loop space theory is concerned with the study of such internal structure on spaces. This structure is of interest for several reasons. The homology of spaces so structured carries "homology operations" analogous to the Steenrod opera­ tions in the cohomology of general spaces. These operations are vital to the analysis of characteristic classes for spherical fibrations and for topological and PL bundles. More deeply, a space so structured determines a spectrum and thus a cohomology theory. In the applications, there is considerable interplay between descriptive analysis of the resulting new spectra and explicit calculations of homology groups. The discussion so far concerns spaces with one structure. In practice, many of the most interesting applications depend on analysis of the interrelation­ ship between two such structures on a space, one thought of as additive and the other as multiplicative.
    [Show full text]
  • Sun City Summerlin Computer Club Seminar Beginning Programming with Visual Basic Script Edition
    Sun City Summerlin Computer Club Seminar Beginning Programming With Visual Basic Script Edition Tom Burt August 31, 2006 This seminar is an experiment. It will present a quick overview of the fundamentals of computer programming, including two “real world” examples. The audience is experienced computer users who can think logically and translate a procedure or other activity into a sequence of steps. For this introduction, we will mainly use the VBScript language, which is a dialect of Microsoft BASIC. It is very similar to Visual Basic for Applications (VBA), which is built into most MS Office applications. It is also similar to the Visual Basic 6 programming language. The VBScript language runtime executive and programming documentation are available free from Microsoft’s Windows Scripting web site. (See the web links at the end of the presentation). If time permits, we’ll also look briefly at Microsoft’s FREE VB.Net 2005 Express Edition. 1 Where to Find the Materials Sun City Summer Computer Club Website Seminars: • http://www.scscc.com/smnr Acrobat file of these slides and Notes: • http://www.scscc.com/smnr/VBScript_Beginning_Programming.pdf ZIP file of the Examples: • http://www.scscc.com/smnr/Programming_Examples.zip TNB August 31, 2006 Intro - Programming VBScript 2 Seminar Agenda Visual Basic Versions and Reference Basic Programming Concepts VBSCRIPT Language -- Bio Break (~10 min) Program 1 – Ticket Draw Program 2 – Clean out Temp folders Web Site Links Open Q and A TNB August 31, 2006 Intro - Programming VBScript We’ll spend the first half of the seminar covering the key programming concepts of the VBScript language.
    [Show full text]