An Introduction to Procedural and Object-oriented Programming, Automation of Windows Applications Installment # 1

Ähnliche Dokumente
Automatisierung von Windows Anwendungen (1)

The 2011 Edition of BSF4ooRexx (for Windows, Linux and MacOSX)

Introduction to Python. Introduction. First Steps in Python. pseudo random numbers. May 2016

Java Tools JDK. IDEs. Downloads. Eclipse. IntelliJ. NetBeans. Java SE 8 Java SE 8 Documentation

Handbuch der therapeutischen Seelsorge: Die Seelsorge-Praxis / Gesprächsführung in der Seelsorge (German Edition)

Unit 1. Motivation and Basics of Classical Logic. Fuzzy Logic I 6

VGM. VGM information. HAMBURG SÜD VGM WEB PORTAL USER GUIDE June 2016

Employment and Salary Verification in the Internet (PA-PA-US)

Übung 3: VHDL Darstellungen (Blockdiagramme)

Level 1 German, 2014

Exercise (Part XI) Anastasia Mochalova, Lehrstuhl für ABWL und Wirtschaftsinformatik, Kath. Universität Eichstätt-Ingolstadt 1

August Macke Abschied, 1914 Museum Ludwig, Köln

ONLINE LICENCE GENERATOR

Einsatz einer Dokumentenverwaltungslösung zur Optimierung der unternehmensübergreifenden Kommunikation

Im Fluss der Zeit: Gedanken beim Älterwerden (HERDER spektrum) (German Edition)

Mock Exam Behavioral Finance

Exercise (Part II) Anastasia Mochalova, Lehrstuhl für ABWL und Wirtschaftsinformatik, Kath. Universität Eichstätt-Ingolstadt 1

Praktikum Entwicklung Mediensysteme (für Master)

DIBELS TM. German Translations of Administration Directions

!! Um!in!ADITION!ein!HTML51Werbemittel!anzulegen,!erstellen!Sie!zunächst!ein!neues! Werbemittel!des!Typs!RichMedia.!!!!!!

Wer bin ich - und wenn ja wie viele?: Eine philosophische Reise. Click here if your download doesn"t start automatically

Algorithms for graph visualization

Level 2 German, 2015

Der Topos Mütterlichkeit am Beispiel Bertolt Brechts "Der kaukasische Kreidekreis" und "Mutter Courage und ihre Kinder" (German Edition)

VGM. VGM information. HAMBURG SÜD VGM WEB PORTAL - USER GUIDE June 2016

Can I use an older device with a new GSD file? It is always the best to use the latest GSD file since this is downward compatible to older versions.

Die einfachste Diät der Welt: Das Plus-Minus- Prinzip (GU Reihe Einzeltitel)

Registration of residence at Citizens Office (Bürgerbüro)

Hazards and measures against hazards by implementation of safe pneumatic circuits

Introduction FEM, 1D-Example

Logik für Informatiker Logic for computer scientists

DPM_flowcharts.doc Page F-1 of 9 Rüdiger Siol :28

FEM Isoparametric Concept

Ein Stern in dunkler Nacht Die schoensten Weihnachtsgeschichten. Click here if your download doesn"t start automatically

Kursbuch Naturheilverfahren: Curriculum der Weiterbildung zur Erlangung der Zusatzbezeichnung Naturheilverfahren (German Edition)

Flow - der Weg zum Glück: Der Entdecker des Flow-Prinzips erklärt seine Lebensphilosophie (HERDER spektrum) (German Edition)

Mitglied der Leibniz-Gemeinschaft

Materialien zu unseren Lehrwerken

Was heißt Denken?: Vorlesung Wintersemester 1951/52. [Was bedeutet das alles?] (Reclams Universal-Bibliothek) (German Edition)

Nürnberg und der Christkindlesmarkt: Ein erlebnisreicher Tag in Nürnberg (German Edition)

Selbstlernmodul bearbeitet von: begonnen: Inhaltsverzeichnis:

PONS DIE DREI??? FRAGEZEICHEN, ARCTIC ADVENTURE: ENGLISCH LERNEN MIT JUSTUS, PETER UND BOB

A Classification of Partial Boolean Clones

Die Bedeutung neurowissenschaftlicher Erkenntnisse für die Werbung (German Edition)

Der Adapter Z250I / Z270I lässt sich auf folgenden Betriebssystemen installieren:

1. General information Login Home Current applications... 3

Funktion der Mindestreserve im Bezug auf die Schlüsselzinssätze der EZB (German Edition)

Word-CRM-Upload-Button. User manual

Weiterbildungskolleg der Stadt Bielefeld Abendrealschule Fachbereich Englisch Frachtstraße Bielefeld

FEM Isoparametric Concept

EVANGELISCHES GESANGBUCH: AUSGABE FUR DIE EVANGELISCH-LUTHERISCHE LANDESKIRCHE SACHSEN. BLAU (GERMAN EDITION) FROM EVANGELISCHE VERLAGSAN

prorm Budget Planning promx GmbH Nordring Nuremberg

Getting started with MillPlus IT V530 Winshape

Analyse und Interpretation der Kurzgeschichte "Die Tochter" von Peter Bichsel mit Unterrichtsentwurf für eine 10. Klassenstufe (German Edition)

VORANSICHT. Halloween zählt zu den beliebtesten. A spooky and special holiday Eine Lerntheke zu Halloween auf zwei Niveaus (Klassen 8/9)

Level 2 German, 2013

Das Zeitalter der Fünf 3: Götter (German Edition)

Soziale Arbeit mit rechten Jugendcliquen: Grundlagen zur Konzeptentwicklung (German Edition)

Introduction FEM, 1D-Example

Duell auf offener Straße: Wenn sich Hunde an der Leine aggressiv verhalten (Cadmos Hundebuch) (German Edition)

Privatverkauf von Immobilien - Erfolgreich ohne Makler (German Edition)

Max und Moritz: Eine Bubengeschichte in Sieben Streichen (German Edition)

LiLi. physik multimedial. Links to e-learning content for physics, a database of distributed sources

Konkret - der Ratgeber: Die besten Tipps zu Internet, Handy und Co. (German Edition)

Informeller Brief Schreiben

HIR Method & Tools for Fit Gap analysis

BIRTHDAY PRESENTS FOR GRANDMOTHERS

Level 2 German, 2016

There are 10 weeks this summer vacation the weeks beginning: June 23, June 30, July 7, July 14, July 21, Jul 28, Aug 4, Aug 11, Aug 18, Aug 25

Ingenics Project Portal

Level 1 German, 2016

Killy Literaturlexikon: Autoren Und Werke Des Deutschsprachigen Kulturraumes 2., Vollstandig Uberarbeitete Auflage (German Edition)

Mash-Up Personal Learning Environments. Dr. Hendrik Drachsler

Wie man heute die Liebe fürs Leben findet

Wählen Sie das MySQL Symbol und erstellen Sie eine Datenbank und einen dazugehörigen User.

Tube Analyzer LogViewer 2.3

SAMPLE EXAMINATION BOOKLET

FEBE Die Frontend-Backend-Lösung für Excel

Level 1 German, 2012

Titelbild1 ANSYS. Customer Portal LogIn

PONS DIE DREI??? FRAGEZEICHEN, ARCTIC ADVENTURE: ENGLISCH LERNEN MIT JUSTUS, PETER UND BOB

Die gesunde Schilddrüse: Was Sie unbedingt wissen sollten über Gewichtsprobleme, Depressionen, Haarausfall und andere Beschwerden (German Edition)

Prediction Market, 28th July 2012 Information and Instructions. Prognosemärkte Lehrstuhl für Betriebswirtschaftslehre insbes.

Username and password privileges. Rechteverwaltung. Controlling User Access. Arten von Rechten Vergabe und Entzug von Rechten DBS1 2004

Harry gefangen in der Zeit Begleitmaterialien

Interkulturelle Kompetenzen: A test for tourists

-Which word (lines 47-52) does tell us that Renia s host brother is a pleasant person?

CABLE TESTER. Manual DN-14003

Weihnachten anno Domini 2014: Geschichten, Sprüche und anderes (German Edition)

RailMaster New Version 7.00.p26.01 /

Exercise (Part VIII) Anastasia Mochalova, Lehrstuhl für ABWL und Wirtschaftsinformatik, Kath. Universität Eichstätt-Ingolstadt 1

Schöpfung als Thema des Religionsunterrichts in der Sekundarstufe II (German Edition)

Data exchange with Prosonic Flow 93T

Supplementary material for Who never tells a lie? The following material is provided below, in the following order:

Socken stricken mit nur 2 Stricknadeln: Vier verschiedene Techniken (German Edition)

ELBA2 ILIAS TOOLS AS SINGLE APPLICATIONS

NEWSLETTER. FileDirector Version 2.5 Novelties. Filing system designer. Filing system in WinClient

Parameter-Updatesoftware PF-12 Plus

Transkript:

MIS Department An Introduction to Procedural and Object-oriented Programming, Automation of Windows Applications Installment # 1 Introduction, Overview, Statement, Procedure, Function Prof. Rony G. Flatscher Vienna University of Economics and Business Administration Wirtschaftsuniversität Wien Augasse 2-6 A-1090 Vienna Hier An Introduction Vortrags-/Vorlesungstitel Automatisierung Procedural von Windows and im Master Object-oriented Anwendungen eintragen Programming (3) (oorexx) 1, p.1 Prof. Prof. Dr. Rony G. Flatscher

Overview, 1 Course Basic concepts of the object-oriented paradigm Standard application systems Scripting language Foils Automation ("remote controlling") of applications Automation of operating systems like Linux or Windows http://wi.wu-wien.ac.at/studium/abschnitt_2/lva_ws04/rgf/poolv/english/foils Excercises http://wi.wu-wien.ac.at/studium/abschnitt_2/lva_ws04/rgf/poolv/english/excercises Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.2

Overview, 2 Why Rexx? Why Object Rexx? Simple syntax ("human-centric" language) Easy and quick to learn Powerful object-model All important concepts of the OO-paradigm available Windows Scripting Engine (WSE) Full automation of Windows applications possible Availability of Software http://www.oorexx.org Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.3

Overview, 3 "Interactive" lecture Please ask questions! Do not fear "wrong", "easy" or "ridiculous " questions Questioner concentrates on the answer (easier and more thorough learning of new concepts) Questioner usually can rely on the fact that there are others who would like to place the same question (but don t dare/bother to do so) Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.4

History, 1 http://www2.hursley.ibm.com/rexx/rexxhist.htm 1979 - IBM (Mike F. Cowlishaw, IBM-Fellow) Successor of a rather cryptic script language ("EXEC") on IBM mainframes Goal: to create a "human-centric" language Interactive (Interpreter) REXX: Acronym for "REstructured extended executor" Since 1987 IBM's "SAA" (System Application Architecture) "Procedural Language" Strategic script language for all IBM platforms Numerous commercial and open source versions of the language, available for practically all operating systems there are ANSI Rexx Standard in 1996 ANSI "Programming Language - REXX", X3.274-1996 Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.5

History, 2 Since the beginning of the 90ies Going back on an initiative of the powerful IBM user interest group "SHARE" development of an object-oriented version of REXX started "Object-based REXX" a.k.a. "Object REXX" Fully compatible with classic ("procedural") Rexx Internally fully object-oriented All classic Rexx statements are transformed into object-oriented ones internally! Powerful object model (e.g. meta-classes, multiple inheritance) Still a simple syntax Availability 1997 part of OS/2 Warp 4 (free) and free for Warp 3 (with SOM) 1998 AIX (first evaluation version) and Linux (free) 1998 for Windows 95 and Windows NT (with OLEAutomation/ActiveX) Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.6

History, 3 Since 1996 development of "NetRexx" by the original author of Rexx, Mike F. Cowlishaw Java in the "clothes" of Rexx NetRexx-programs are translated into Java byte code Simpler programming of the Java VM due to the simpler Rexx syntax ~30% less Code (syntactical elements) than Java Due to the Rexx syntax, easier to learn for the programming novice URLs for Rexx, Object Rexx, NetRexx http://www.rexxla.org/ http://www.software.ibm.com/ad/obj-rexx/ http://www2.hursley.ibm.com/rexx/ http://www2.hursley.ibm.com/orexx/ http://www2.hursley.ibm.com/netrexx/ news:comp.lang.rexx Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.7

History, 4 May 2004 The "Rexx Language Association" (RexxLA) and IBM start non-public negotiations about open-sourcing Object Rexx IBM: Manfred Schweizer, manager of IBM's Rexx development team RexxLA: Pam Taylor (experienced commercial manager, USA), Mark Hessling (maintainer of Regina and author of numerous Rexx libraries, Australia), Rony G. Flatscher (MIS professor, Austria/Europe) October 12th, 2004 IBM and the Rexx Language Association (http://www.rexxla.org) announce that RexxLA will manage Object Rexx under the name "Open Object Rexx" ("oorexx") April 2005 The Rexx Language Association releases the opensource version Open Object Rexx (oorexx), homepage: http//www.oorexx.org Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.8

Minimal Rexx-Program /* a comment */ SAY "Hello, my beloved world" Output: Hello, my beloved world Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.9

RexxTry.rex "RexxTry.rex" Rexx-Program which allows interactive execution of Rexx statements Transfers every Rexx statement entered through the keyboard to the Rexx interpreter for execution Displays console-output or errors of entered Rexx statements Program ends when user enters EXIT through the keyboard Invoking the program via a command in a command line window: rexx RexxTry.rex rexx rexxtry Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.10

Notation of Program Text Upper or lowercase spelling irrelevant All characters of a Rexx statement will be translated into uppercase and executed Exception: Contents of a string remains unchanged Strings are delimited by apostrophes (') or by quotes ("), e.g. "Richard", 'Richard', "\{[]}\gulp!öäüß!{nix }" Multiple blank characters are reduced to one blank Example say "\{[]}\gulp!öäüß!{nix }" reverse( Abc ) becomes: SAY "\{[]}\gulp!öäüß!{nix }" REVERSE( ABC ) Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.11

Characters Characters outside of strings and comments must be from the following character set Blank a thru z A thru Z 0 thru 9 Exclamation mark (!), backslash (\), question mark (?), equal sign (=), comma (,), dash/minus (-), plus (+), dot (.), Slash (/), parenthesis (()), square parentheses ([]), asterisk (*), tilde (~), semicolon (;), colon (:) and underline (_) Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.12

Variables Variables allow storing, changing, and retrieving strings with the help of a discretionary name called an identifier A = "Hello, my beloved world" a="hello, my beloved variable" A = a "- changed again." say a Output: Hello, my beloved variable - changed again. Identifiers must begin with a letter, an exclamation mark, a question mark or an underline character, followed by one or more of these characters, digits, and dots. Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.13

Constants Constants never get their values changed It is possible to use literals which are string constants appearing verbatim in an expression If one wishes to name constants, then there are two possibilities available The constant value is assigned to a variable, the value of which never gets changed in the entire program, e.g., Pi = 3.14159 The constant value can be saved in the local (.local) or global (.environment) environment and will be referred to by an "environment symbol", which always start with a dot, e.g.,.local~pi = 3.14159 /* Store value 3.14159 in.local */ say.pi /* retrieves value 3.14159 from.local*/ Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.14

Comments Comments may be nested and are allowed to span multiple lines, e.g. say 3 + /* This /**/ is a /* nested /* aha*/ comment*/ which spans multiple lines */ 4 Output: 7 Line comments: at the end of a statement, comments follow after two consecutive dashes: say 3 + 4 - this yields "7" Output: 7 Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.15

Statements, 1 Statements consist of all characters up to and including the semicolon (;) There may an arbitrary number of statements on a line If the semi-colon is missing, then the end of a statement is assumed by the end of a line /* Convention: A comment begins in 1. line, 1. column */ SAY "Hello, my dear world"; Output: Hello, my dear world Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.16

Statements, 2 Statements may span multiple lines, but you need to indicate this with the continuation character Comma or Dash as the last character on the line /* Convention: A comment begins in 1. line, 1. column */ SAY "Hello," - "my beloved world"; Output: Hello, my beloved world Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.17

Block A block is a statement, which may comprise an arbitrary number of statements A block starts with the keyword DO and ends with END DO DO SAY "Hello," ; SAY "Hello," SAY "world" ; SAY "world" END; END Output: Hello, world Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.18

Comparisons (Test Expressions), 1 Two values (constant, variable, results of function calls) can be compared with the following (Infix) operators (Result: 0=false or 1=true) = equal <>!= \= unequal < smaller <= smaller than > greater >= greater than Negation of Boolean (0=false, 1=true) values \ Negator Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.19

Comparisons (Test Expressions), 2 Boolean values can be combined & "and" (true: if both arguments are true) "or" (true: if either argument are true) && "exclusive or" (true: if one argument is true and the other is false) Boolean combinations can be evaluated in a specific order if enclosed in parentheses: 0 & 1 1 Result: 1 (= true) (0 & 1) 1 Result: 1 (= true) 0 & (1 1) Result: 0 (= false) Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.20

Comparisons (Test Expressions), 3 a=1 b=2 x="anton" y=" Anton " If a = 1 then... If a = a then... If a >= b then... If x = y then... If x == y then... Result: 1 (= true) Result: 1 (= true) Result: 0 (= false) Result: 1 (= true) Result: 0 (= false) a <= b & (a = 1 b > a) Result: 1 (= true) \(a <= b & (a = 1 b > a)) Result: 0 (= false) \a Result: 0 (= false) Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.21

Branch, 1 A branch determines which statement (block) should be executed as a result of a comparison (of a Boolean value) IF test_expression=.true THEN statement; Example: IF age < 19 THEN SAY "Young." A branch can also determine what alternative statement (block) should be executed, in case the Boolean value is false IF test_expression=.true THEN statement; ELSE statement; Examples: IF age < 19 THEN SAY "Young."; ELSE SAY "Old." IF age < 1 THEN DO SAY "Hello," SAY "my beloved world" END Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.22

Branch, 2 Multiple selections (SELECT) SELECT WHEN test_expression THEN statement; WHEN test_expression THEN statement; /*... additional WHEN-statements */ OTHERWISE statement; END Example: SELECT WHEN age = 1 THEN SAY "Baby." ; WHEN age = 6 THEN SAY "Elementary school kid." ; WHEN age >= 10 THEN SAY "Big kid." ; OTHERWISE SAY "Unimportant." ; END Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.23

Repetition, 1 Principally a block can be executed repeatedly DO 3 SAY "Aua!" SAY "Oh!" END Output: Aua! Oh! Aua! Oh! Aua! Oh! Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.24

Repetition, 2 Using a variable to control the number of repetitions a = 3... DO a SAY "Aua!"; SAY "Oh!" END Output: Aua! Oh! Aua! Oh! Aua! Oh! Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.25

Repetition, 3 Repetition using a control variable ("i" in this example) DO i = 1 TO 3 SAY "Aua!";SAY "Oh!" i END Output: Aua! Oh! 1 Aua! Oh! 2 Aua! Oh! 3 Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.26

Repetition, 4 Repetition using a control variable ("i" in this example) DO i = 1 TO 3 BY 2 SAY "Aua!";SAY "Oh!" i END Output: Aua! Oh! 1 Aua! Oh! 3 Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.27

Repetition, 5 Repetition using a control variable ("i" in this example) DO i = 3.1 TO 5.7 BY 2.1 SAY "Aua!";SAY "Oh!" i END Output: Aua! Oh! 3.1 Aua! Oh! 5.2 Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.28

Repetition, 6 Conditional repetition i = 2 DO WHILE i < 3 SAY "Aua!";SAY "Oha!" i i = i + 1 END Output: Aua! Oha! 2 Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.29

Repetition, 7 Conditional repetition i = 3 DO WHILE i < 3 SAY "Aua!";SAY "Oha!" i i = i + 1 END No output, because block is not executed! Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.30

Repetition, 8 Conditional repetition i = 3 DO UNTIL i > 1 SAY "Aua!";SAY "Oha!" i i = i + 1 END Output: Aua! Oha! 3 Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.31

Execution, 1 /* */ a = 3 b = "4" say a b say a b say a b say a + b Output: 3 4 3 4 34 7 Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.32

Execution, 2 /* */ "del *.*" or: or: or: /* */ ADDRESS CMD "del *.*" /* */ a = "del *.*" a /* */ a = "del *.*" ADDRESS CMD a Hier An Introduction Vortrags-/Vorlesungstitel to Procedural and im Master Object-oriented eintragen Programming (oorexx) 1, p.33