Home
Zonnon Builder User Guide - Zonnon programming language
Contents
1. a Figure 8 10 File tree for the ReadWriteSample project Double clicking on the ReadWrite znn file in the project tree will now open it in the Zonnon syntax oriented editor 8 3 Opening and Re opening Projects Lets open the project ZonnonChess as an example First of all press the Open Project icon Bin project tree toolbar or select the main menu item File Open Project Then use the standard NET dialog box to select the Zonnon project file this reveals the structure of the ZonnonChess project onnon Builder E 0 x File Edit View Search Project versions Help O Eggle dD H 5 Bishop znn PawnTransformation znn S Capture znn F Chess Notebook chess lt code gt Capture lt code gt is piece move from sour as move in oppa ent piece is captured at the target H Capture znr Bversion 1 12 24 02 2004 E PawnTranstorm Hauthor Romanow W Y ft SimpleMove znt a piece object ref chess Capture piece chess Piec H Bishop zrn implements chess Move J Eng Zr J knight znr import chess Fiece Kind chess Move chess Board game 5qgquare game Piece qame ColoredPiece Figure 8 11 ZonnonChess Project structure Zonnon Builder records the history of project openings Any Zonnon project can simply be re opened by clicking on the Reopen Project icon in the project tree toolbar or by selecting the main menu item File Recent Projects A list of recently use
2. Files Messages Search ee a a a Figure 8 5 An empty project with the name ReadWriteSample 8 2 Setting up the Project File Structure Lets create some folders and files for the new project To do this review the directories and files that already exist by clicking the left mouse button on the ShowAll icon lin the files toolbar It is located in the left hand window pane just above the project name You can now see all the directories and files in the project file directory and its nested directories The directories and files that are not included in the project are coloured grey Zonnon Builder a olx File Edit wiew Search Project Help HR amp pe Hellow orld history _Hellow orld Shack yew Hello World zbp ReadViriteS ample zbp Shack ew zbp LQ Search Messages Figure 8 6 All directories and files Lets create our own directory for the ReadWriteSample project Click the right mouse button on the project icon and select the menu item Add New Folder Zonnon Builder lox File Edit wiew Search Project Help Helis e D gt Ae EME dd New Folder Hellow arld Add New File histor Hello Rename Shack y rey HelloWorld 2b pen as ML Ready rites ar Shack yew 2by Compile Read WriteSample Execute Properties Figure 8 7 Project icon popup menu Enter the new folder name ReadWrite in the dialog box A new green folder icon will appear in
3. H L Ctrl c opy rl El Faste Ctrl Delete Del Edito Figure 4 7 Edit menu in main Zonnon Builder menu in the main toolbar Also you can use icons Cut Copy ES and Paste fonnon Builder File Edit View Search Projeck ve D WEll E oa gt Figure 4 8 Main toolbar J the Cuticon the Copy icon E the Paste icon It is possible to customise the look of the program text see Editor Options for details 5 Searching Text in Program Files 5 1 Searching for text in all program files Sometimes it is desirable to find a particular piece of text in all the files in a program To achieve this select the menu item Find in Project in the Search main menu Zonnon Builder ae Ioj x File Edit View Search Project Versions Help C i t Find Ctrl F Find Next F3 Replace Ctrl F d zrn a Castling znn E Queen znn a chess ae 4 Find in Project Ctrl P lt code gt Board lt code gt if initialized chess 2 Ci Crl G fs cam mersion 1 15 11 03 2004 coi FawnT ranstormation zr author Romanow W Y fst SimpleMove znn a8 piece bject Chess board implements game Board d Bishop znn z King znn import al Knight zmn util ArrayList fs Pawn znn game Square qame ColoredPiece al Queern znn chess Piece chess PieceBox chess Move ch Fook nn chess Pawn Chess Rook chess Kniqght chess H Board zna War piec
4. a comment can be added the file version to document why the file was committed Commik the file HelloWorld znn Version ae Comment Cancel The program comment was changed Figure 9 2 9 Commenting in committed file version The next file version number will be suggested 1 3 in this case It is also possible set your own value for the version number for example 2 0 9 3 Project versions To create project version select the Commit Project menu item in Versions menu Versions Help Commit File Commit Project File History Project History Figure 9 3 1 The Versions Commit Project menu item on the main menu When Commit Project has been selected the following dialog box appears so that a comment and a label can be added the project version to document why the project was committed Commit the project Version ee 1 0 2 0 ok Cancel Label New implementation of chess notation Comment The type STRING instead the type 4ARAY OF CHAR is Used now for chess notation presentation Figure 9 3 2 Commenting in committed project version Lets look at the project history now Select the Project History menu item in Versions menu The project history window appears in the Zonnon Builder s centre window it has three tab windows Info Contents and Diff In the Info tab window the top panel contains the project history list where the top list item presents current project C
5. znn 1 2 efe4 2004 Wehess move Castling znn 1 2 efe4 2004 Wchess move Pawn ranstormation zan 1 2 efe4 2004 Wohess move SimpleMowe zrn 1 1 ere 4 2004 Wohess move dl Bishop zrn 1 1 efe4 2004 Wohess piece King znr 1 1 ef e4 2004 Wohess plece Knight zrr 1 1 efe4 2004 Wohess plece Pawn znr 1 1 ef 24 2004 Wehess plece Ween znr 1 1 dragend Wohess plece Rook znr 1 1 2fe4 2004 Wehess piece ChessConsole znr 1 1 ere 4 2004 Wohess uicansole Board znr 1 1 efe4e 2004 chess Move znr 1 2 ef e4 2004 chess Info Content ae Dutt Messages Search Figure 9 3 3 The content for Version 1 0 2 0 of Chess Notebook project Lets look at the Diff tab window The top panel contains two colored project history lists which make it easy to compare the content history of the project in the lists The differences between the project s versions is shown in the lower panel onnon Builder E S 0 X Fie Edit wiew Search Project versions Help OD W l E fa Ee A EP Project History H H Chess Notebook Differences From Sersion Date Time Wersion Date Time 2 24 2004 4 57 PM F File 2 24 2004 4 57 PM E1020 2 24 2004 ee PM E1020 2 24 2004 448PM 2 24 2004 413 PM E1010 2242004 413PM Fie ersion Date Time Directory Capture znn 2fe4 2004 4 13 PM Achess move Castling znn l ere 4 2004 413 PM Achess move Pawn transformation znr Er TTIE 4 13 PM Achess mo
6. CEDURE SecondProcedure BEGIN ThirdProcedure END SecondProcedure PROCEDURE FirstProcedure BEGIN SecondProcedure END FirstProcedure BEGIN FirstProcedure END StackView Attempted to divide by zero Server stack trace at onnon Stack iew ThindProcedure in F onnonS amples Stack Views Stack View zmn line 13 at onnon Stack View SecondProcedure in F onnonS amples Stack View Stacky ew zarcline 17 at onnon Stack view FirstProcedure in F onnonSamplesStack views Stackem zarncline 20 at onnon Stack View body in F WonnonS amples Stack View Stack View znrline 23 at onnon StackYiew Maini 1 Messages Ty Stack Ln 13 Col Figure 7 4 The StackView post mortem stack in the Stack tab 8 Setting Up a Project 8 1 Creating a Project The Zonnon Builder uses the notion of a project to organise a set of related Zonnon program files When Zonnon Builder starts up you will see the initial empty window onnon Builder E np bie aeaa IM Fie Edit View Search Project Versions Help D Loli D W ee amp amp T Messages Search In 1lCol lth 1 g Figure 8 1 Empty Zonnon Builder window To create new project turn on project panel by menu item View Project Files The first step is to create a project to store and organise the program files Start by clicking the right mouse button on the project icon Hin project files tree The following po
7. E kc 2004 ETH Zurich Hello world gt gt m Pic 3 5 HelloWorld program execution results Then Zonnon Runtime environment output the prompt gt gt for a command input Now print the command quit and press the Enter key to out from Zonnon Runtime program The command help can be used to receive information about other commands The command list shows all program modules and its procedures To start a procedure print the module and procedure names and press the Enter key 3 3 Zonnon program with few files More complicated Zonnon program contains few program files To use the files in Zonon Builder its must be located in same root directories or in nested directories For example the chess program files are located in the root directory chess or in nested directories To open the program files select the menu item File Open Directory The following dialog box appears Cancel Pic 3 6 The directory selection dialog box Select some directory with Zonnon programs and press the Ok button The program tree with the program files will appears in the left panel of main window Zonnon Builder a 0 x Fie Edit view Search Project Versions Help Dees t S ae a chess ffi move ce piece a ui ft Board znn E Fiece znn a y Fieceb or znn Po Stack 1 Messages Project Files Pic 3 7 The program tree To compile all program fil
8. HelloWorld Messages Mg Stack Ee Search Ln MEE is Bay ae F Figure 6 1 The Project submenu in main menu H Project Files The project options dialog box will appear Project properties Mame Hello World Output file exe HelloWorld exe startup module Hella ford ok Figure 6 2 The project options dialog box Enter the file name for the program to be compiled in the Output file text box In our sample the directory bin is located the directory where the project file is located The program s main module name should be entered in the text box Startup module One of project files must of course contain the Zonnon module named HelloWorld Now we ready to compile our HelloWorld program in the project 6 2 The project compilation To compile the project select Project Build from the main menu or click on the Build icon Sain the main toolbar The results of the compilation of the HelloWorld project will now appear in the Messages tab of the lower right hand window onnon Builder E 0 x Fie Edit View Search Project Versions Help Dl i 5 ES A ee ol sh Pa Del Hellow orld znr module HelloWorld import System String aystem String writeln Hello world readlnisl end HelloWorld Zonnon Compiler Version 1 0 0 25 Sunday May 30 2004 9 24 56 PM Messages amp Search o i Fo S d g Figure 6 3 A successful HelloWorld proj
9. R WRITELN Hella world j READLN 3 END HelloWorld Current file Wednesday January UF z004 11 56 05 PH Contents Z Diti Figure 9 2 6 The Refresh menu item of the History Window popup menu The new file revisions and versions will appear in the history lists When the file content is in an appropriate state i e compiled or debugged the file content can be committed as the next file version To do this select the Versions Commit File menu item in the main menu Versions Help Commit File commit Project File History Project History Figure 9 2 7 The Versions Commit File menu item on the main menu It is also possible to select the Commit HellowWorld znn in the program editor popup menu Zonnon Builder E l0 x File Edit wiew Search Project Versions Help D H bla p A OH Helloworld znn History E HelloWworld znn F Hello World t Close Helloworld znn A Helloworld The simples Zonnon p Close all except Helloworld znn al Hellow orld znr si Close MODULE HelloWorld VAR s aPRAY go oF Save HelloWorld znn BEGIN Save Hellovorld znn as WRITELN Hello worl Save HellowWorld znn as HTML File READLN 3 ee END HelloWorld Compile HelloWorld znn Show History Figure 9 2 8 Selecting Commit HellowWorld znn on the program editor popup menu When Commit has been selected the following dialog box appears so that
10. World znn file compilation using a project tree file node popup menu Now the program is ready to run so lets do that next 7 Executing a Program 7 1 Successful program execution Once a program has been successfully compiled it can be executed So lets execute the HelloWorld program by clicking on the menu item Project Execute or click on the Run icon gt in the main toolbar or select the Execute menu item of the project tree root node Zonnon Builder eS Ioj x File Edit View Search Project Yersions Help ik amp cS y B Build Ctrl F9 Compile HellowWorld znn Ctrl Shift F9 fa i E ry Execute E Helloworld P ties bee H HelloWorld znr habit aystem string writeln Hello world readlinisi end HelloWorld Ti onnon Compiler Version 1 0 0 25 Sunday May 30 2004 9 24 56 PM mfi c 2003 ETH Zurich Eg Messages In Stack Search E Project Files Figure 7 1 The Execute menu item in the project tree root node When the program starts to run the HelloWorld console window appears file F ZonnonSamples HelloWorld fHelloWorld exe Zonnon Runtime Version 1 0 0 25 of Friday May 21 004 8 03 11 PM r fc 2004 ETH Zurich Hello world P m E 7 2 The HelloWorld program s Console Window The HelloWorld program will be executed and it will wait for any text to be entered before running to completion The execution results will appear in the Messages tab Zonnon Bu
11. Zonnon Builder User Guide 1 Introduction The Zonnon Builder is a NET based IDE Integrated Development Environment designed to facilitate the process of developing and managing programs in the Zonnon language which run on the NET platform lt supports the notion of a Project as a repository used to hold all the folders and files for a program or if desired for several related programs A syntax oriented editor is used for viewing and editing Zonnon source files The search engine can be used within a single source file or across a selected set of files in a project making it convenient to track the implications of proposed changes across the project A version management system is included to control the revisions and versions of sets of files that form consistent software releases within a project Of course the heart of the Builder is the Zonnon Compiler for NET which rapidly compiles Zonnon source files ready for execution on the NET platform Note that the Zonnon Builder runs on top of the Microsoft NET platform this needs to be installed before installing and running the Zonnon Builder Zonnon Builder User Guide 2 Zonnon Builder Installation If you don t already have the NET Framework installed then the first thing to do is to download it from the Microsoft site and install it Now just follow the following four steps to install Zonnon Builder Step 1 Unzip the ZonnonBuilder zip distribution file to the director
12. at the central window panel Zonnon Builder E jol x File Edit View Search Project Versions Help De Gel tamp p E unnamed znr Messages cq Search Ln 6 Col 1 Ch 1 F Pic 3 2 Empty program editor Lets input simples HelloWorld program in Zonnon language fonnon Builder File Edit wiew Search Project Versions Hel DMS sy SBD I unnamed znr module HelloWorld begin vritelni Hello Narla end HelloWorld Messages amp Search Pic 3 3 Hello World program in Zonnon To compile program press the keys combination Ctrl Shift F9 The compilation results will be presented at the panel Messages Zonnon Builder E E Si fe x Fie Edit View Search Project Versions Help j cS A Ea Dr b E unnamed znan module HelloWorld begin wEitelni Hello World end HelloWorld Jil Zonnon Compiler Version 1 0 0 25 Friday May 21 2004 8 03 10 PM fil c 2003 ETH Zurich fil The path has been compiled Sunnamed zrir Messages Search Pic 3 4 HelloWorld program compilation results The executable file HelloWorld exe was created at same directory where the file HelloWorld znn is located To execute the compiled HelloWorld program press the key F9 The console window with the messages Hello World will be created file F ZonnonSamples HelloWorld HelloWorld exe Zonnon Runtime Version 1 0 0 25 of Friday May 21 2004 8 03 E
13. bly that has been deployed to the program s users The current Zonnon Builder has simple implementation of these versioning concepts All revisions and versions are located on your computer In future other versioning implementations may use popular distribution version control systems as the basis for the versioning implementation for example PVCS QVCS CVS and SourceSafe 9 2 File revisions and versions To view a history file select the Show History menu item in the file s popup menu in the project tree Zonnon Builder E Ioj x Fie Edit View Search Project Versions Help D el amp p gt E E BE Hello orld Bi Hello orld Hello orld zrne Open Save 45 Delete Rename Exclude From Project Compile Hellovvorld znn Show History Messages Figure 9 2 1 The Show History item in the project tree s menu The file history window appears in the Zonnon Builder s centre window it has three tab windows Contents Diff and Info In the Contents tab window the top panel contains the file history list where the top list item presents current file Current file item has a File icon i The next items are the versions and revisions of the file each file version has a File Version icon land each file revision has a File Revision icon al Every file history list item has a data and a time attribute If you select a file version or revision in the history list the
14. d projects will appear Zonnon Builder e O x Fie Edit View Search Project Versions Help L m iE ra dt h b A m Bishop zrn a Pawn ranstormation 2nn en Ches Fi zonnonGames ZonnonGame Zonnonchess zbp eg cP Zonnondames ZonnongamelZonnonGane core zbp ei Fi ZonnonGames onnongamelfonnond arcade zbp gt 15 piece of chess game Y 20 Clear Project History y i S FawnTransform Ao n SimpleMove znr I Le piece a object chess Bishoplicolor game ColoredPiece c implements chess Piece import Game Square chess Piece procedure public getName e age a E bee ap PieceBiox znr J oft Project Files Figure 8 12 The Recent Projects list If the re open list becomes too long to be manageable then some elements can be removed from the list To do this select the item Clear Project History in the list and then tick the check boxes of the projects are to be removed from the list by clicking on them Select project files for removing from history list r x i F ZonnonG ames ZonnonGameZonnonChess zbp i F ZonnonS amples A eadwriteS ample zbp iv Fo onnonS amples Stack view zbp Cancel Figure 8 13 Clear projects history dialog box The next step is to create and edit programs in Zonnon syntax oriented editor 9 Versioning Introduction 9 1 Versioning terms and concepts The Zonnon Builder keeps a history of your project f
15. eboxes array 2 of chess Piecebox E Project Files Figure 5 1 The Zonnon Builder Search menu The following dialog box will appear Search in Project Options Find what Cancel W Match case Match whole word Figure 5 2 Search in Project Options dialog box Lets look for the program text files with the word Pawn Type the text to be searched for in the Find What textbox and then press Ok button The search results will presented in the Search tab of the bottom window pane on the right onnon Builder 2 5 File Edit View Search Project Versions Help DhHeoBsltBe gt HR ef Casting znr Queen znn 5 Board zrin F chess pat f move The lt code gt Board lt code gt is initialized chess board fl Capture znin A Castling znr vers ion 1 15 11 03 2004 AT PawnTransformation zr author Romanov V Y l object chess Board implements game B Board ae import ol Knight znn util darrayList a Famn znn Game aquare game coloredPiece chess Piece chess Piecebox chess Mowe chess Histol i chess Fawn chess Rook chess Enight chess Bishop H F onnonG ames onnonG amechess movePawn ranstormation znr ags F onnonG amesonnonGame chess piece Pawn znn l aal F onnoni ames ZonnonGame chess uisconsole ChessLongole znn A Fee bee fil 013 8 chess Pawn chess Aook chess Knight chess Bish
16. ect compilation FS Project Files Lets deliberately introduce an error into the program and see what happens We will remove the semicolon from the following declaration VAR s System String Now compile the project again and then look at the compiler diagnostics in the Messages tab Zonnon Builder E 2 0O x File Edit View Search Project Versions Help Does tee Heeg Eh l li Hellow orld znr module HelloWorld import System string var 3 aystem string begin writelni Hello world reac ln s end HelloWorld fil Zonnon Compiler Version 1 0 0 25 Sunday May 30 2004 9 24 56 PM c 2003 ETH Zurich H F onnonS amples Hellow orld Hellow orld zrn JE 5 1 2001 Lesern expected JE 5 1 2007 Synta eror in variable declaration no semicolon JE 7 9 2001 Lesern expected Search Messages Project Files Figure 6 4 The HelloWorld project compilation showing errors Now double click on first error diagnostic in the Messages tab 6 1 2001 Lexem expected The file HelloWorld znn opens with the text scrolled to the error location 6 1 which will be highlighted in red BEGIN 6 3 The program file compilation It is also possible to compile an individual file using the editor tab s popup menu Compile Zonnon Builder O x File Edit View Search Project versions Help D Wg S db
17. es press the keys combination Ctrl F9 The compilation results will be presented at the panel Messages The executable file name has the root name and the extention exe chess exe It is located in the chess directory The program directory may be interpreted as project with default properties To change executable file name and location to set the program main module see Project Setting for details 4 Editing a Program 4 1 File opening and closing To edit any Zonnon program file select the menu item File Open File in the main Zonnon Builder menu fonnon Builder File Edit wiew Search Project Open File Cr Save File Crrl s Save File As Mew Project Open Project Save Project Save Project 45 Close Project Recent Files d Recent Projects Exit Figure 4 1 The Open File menu item in the main menu Alternatively right click on the Open File icon Ein main toolbox fonnon Builder File Edit View Search Project Ve Pope Figure 4 2 Open File icon in main toolbar lt is also possible to open any Zonnon program file by double clicking on it in the program tree and then using the Open popup menu item that then appears onnon Builder a 3 O x File Edit View Search Project Versions Help Doe ee Be p EA J Boardznn E Castling znn E F chess ae a move t lt code gt Castling lt code gt is single move of Kinc E Capture znn oft Castling znn t vers
18. gt F A E Hellow orld zrn module He lose HelloWorld znn import Close all except HelloWorld znn Close VAE 3 begin write li readin end Hellot Save Hellovorld znn Save Hello orld znn as Save Helloviorld znn as HTML File Compile Hellov orld znn Show History Commit HelloWorld znn 4004 9 24 56 PM 7 c 2003 E F onnonS amples Hellow olds Hellow orld zn E 5 1 2001 Lesen expected Hs JE 5 1 2007 Syntas eror in varnable declaration no semicolon nf E 7 0 2007 Lesen expected l Messages Project Files Figure 6 5 HelloWorld znn file compilation using the editor tab popup menu Another possibility is to use a popup menu of the relevant project tree file node Zonnon Builder Ee 0 x File Edit wiew Search Project Versions Help a D W Eglit pmm p 2 T Hellow orld znr a Hellow orld module HelloWorld E PERTE import System String Open Save as em String Delete lo world Rename Exclude From Project Compile HelloWorld znn Version 1 0 0 25 Sunday May 30 2004 9 24 56 PM Show History rich a F onnons amples H allow orldH ello orld znr E 5 1 2001 Lexem expected bese JE 5 1 2007 Syntas eror in variable declaration no semicolon AE 7 8 2001 Lesen expected l Messages amp Search Project Files Figure 6 6 Hello
19. hess Board znr i 13 8 chess Pawn chess Aook chess Knight chess Bishop chess Queen chi bees H 147 45 chess Piece Kind pawn p new chess PawnlpieceColor an b 4 Messages Ty Stack Search E Project Files Pn 147 Col 459 Ch 49 we Figure 5 4 Search result colouring in the Zonnon Editor 5 2 Searching for text in a file To search within a file that is already open use Search Find from the main menu item The following dialog box will appear fonnon Builder e E 10 x Fie Edit Wiew Search Versions Help k i i db a h A S Castling znn E Beade na ey a E Chess Notebook ai T chess aj ba move beid Capture gigi E Castlin ME S A ea Find what King Findh ext oes SimpleM El e W Match case Match whole word lt code gt Castling lt code gt 13 single move of king and t E Bishop z gt E King znn chess ABE chess Move chess Piece K E Knightznn game Square of Pawn znn es Queen zan ww ee mes Rook znr Book s part of castling move bud H H i k fs Board znn n Move znn ft Piece znn a oft PieceBox znn ia Files Messages Search Ln ll Col llth 6 F Figure 5 5 The Find Options dialog Enter the piece of text to be searched for in the Find what textbox and then click the FindNext button If a match is found it will appear in the program editor with a blue backg
20. ilder E 0 x File Edit wiew Search Project Versions Help L m cS dt a F A E HelloWworld znin module HelloWorld Helloyorld znr import System string aystem string writeln Hello world EeaGgl nls end HelloWorld i onnon Compiler Version 1 0 0 25 Sunday May 30 2004 9 24 56 PM oof c 2003 ETH Zurich i Execution is started for F onnonS amplesH elloWorldHelloW orld ese i The file F ZonnonS amples Helloorld Helloworld exe has been executed with result 0 i The program F onnonS arnples H ello orldH ello orld ese has exited Project Files Messages Figure 7 3 The HelloWorld program execution result 7 2 Post mortem program stack Whilst the program is running the Zonnon Builder keeps a trace record of the program execution stack The project StackView zbp project is designed to reveal the contents of the post mortem stack when a program has been terminated or run to completion After program compilation and execution the stack information appears in the Stack tab of the lower right hand window onnon Builder 3 o 5 x File Edit View Search Project Versions Help Li E at a ar F A S Stackview znn ae H H Post Morten Stack Sample Se Chack viens The sample demostrates program stack 7 in zomon Builder in the Messages tab a MODULE StackView PROCEDURE ThirdProcedure VAR a b INTEGER END ThirdFrocedure PRO
21. iles Every time a file is changed and saved a copy of itis also saved and these file copies are called file revisions It is possible to restore back to any file revision state in the file s history Once a file has reached some notional of completion it can be committed as a file version For example you might define a new file version if the file compiles without errors or perhaps when some algorithm has been successfully implemented and tested The file version has a unique version number for example the number 1 3 It is also possible to attach long text as part of the file version The version number is used to denote the version difference The long text will called version comment and it contains a description which relates to the file changes The file versions make up one of the dimensions of versioning Some new feature of your program may be implemented by editing several files in the project After it has been debugged a new version number can be defined for a project version a short label and a long comment can also be added During the development process each file may be changed many times and have one or more file versions f any file has been changed but does not have file version number then it will be given the next file version number as a default The project version number becomes the NET assembly version number when the project is compiled This makes it feasible to restore the project configuration for each NET assem
22. ion 1 11 24 02 2004 aaa Pawn ranshormation 2r dauthor Romanov W Y fs SimpleMove znn mI Ei piece object ret chess Castling Kking chess kKinc ft Bishop znn implements chess Move ie mport chess King chess Move chess Piece X ane Square Save 45 part Of Cash ling move Delete a Rename b A Exclude From Project Compile Queen zmn Show History Lo search Project Files Figure 4 3 Popup menu of program tree file item Now lets open a few Zonnon program files in the Zonnon Chess project onnon Builder e B x File Edit View Search Project Versions Help DHe elti B2 gt loldi 126 fi a chess e move t lt code gt Queent code gt is piece of chess game 2a Capture znn E Casting znn Gversion 1 9 307 0572004 z FawnTranstormation zr Hauthor Romanow W Y fst SimpleMove znn g eg piece ohject ret chess Queen color qame Colorec z Bishop zrn implements chess Piece S Board znn S Castling znn S Queen 2nn a lt import qame Square qame ColoredPiece Color cr a procedure public getName string T begin FeLuEn D S e A end getName L Search Project Files Ln 14 Col 16 Ch l6 Figure 4 4 The Zonnon program file editor Note that different syntactic elements of the program source text are highlighted in different colours to improve clarity Zonnon Builder updates this syntax oriented program text col
23. ions Element Attributes Palette TT tt ft ine CEEE E ee Bold talic Screen Element comment number string Keyword predefined normal All Text Attributes Size E Family Comic Sans MS Frogram Sample Comment MODULE A VAR i INTEGER BEGIN S Figure 10 6 The new program font size and family presentation Now press the OK button and open the program file HelloWorld znn The program text with new editor options will now appear using the new attribute values fonnon Builder File Edit View Search Project versions Help PASS tm BS h EB ie E Helloworld zrn a Helo World i i S ST module HelloWorld import System String var s System String begin writeln Hello world read n s end HelloWorld H Project Files Messages a Search Ln Y Col Sa Ch 149 a Figure 10 7 The colored program text with new editor options Links and Feedback 1 The Zonnon project site at ETH Zurich http www zonnon ethz ch 2 The Zonnon Builder section of the site http www zonnon ethz ch compiler zb If you have any feedback on this document or on the Zonnon Builder itself then please email them to zonnon inf ethz ch
24. onG ame chessspiece Gueen 2nn i F ZonnonGames ZonnoanGame chess PieceBox znn Cancel Figure 4 6 Dialog box for closing program files The selected file can be saved with either the same name or with a different name The menu items Save Castling znn or Save Castling znn as are used for this If you want to publish your Zonnon program in an Internet based format then use the menu item Save Castling znn as HTML The HTML file Castling znn html will contain your Zonnon program it is coloured to highlight the program s syntax The Zonnon source text can be compiled to create a program or part of a program by clicking the Save Castling znn menu item For further details see the chapter on Program Compilation The history of the Zonnon program file can be viewed by clicking on the Show History menu item A History Window will opened for the file it contains the e content and modification date for each file revision and date e the revision version and current state of the file using colour coding e commenis associated with each file version If the file is now completed it can be saved as the next commented version of the file by clicking on the menu item Commit Castling znn For further details see the chapter on Versioning To edit the actual file content itself then it is possible to use the menu Edit in the main Zonnon Builder menu fonnon Builder File Edit View Search Project W Undo Chri 2 Cut krl E 3
25. op chess Queen chi H 147 45 chess Piece Kind paw p new chess Pawn peceColor H 4 Messages Ma Stack Search Project Files Poin 2 COL Lh Figure 5 3 The Search tab with search results This shows that six files contain the word Pawn and it was found a total of 24 times Lets open the search result in file Board znn it contains two strings that include the word Pawn Line number 13 contains Pawn in column 8 and line 144 contains Pawn in column 49 Double clicking on a line opens the Board znn file the line and column location is highlighted in red Zonnon Builder E loj x File Edit View Search Project Versions Help k is S d a h r E E Castling znn E Queen znn Board znn El m chess return chessHistory 1isPieceMoved piece square F Oo move end isPieceMoved fo pe S Capture znn e a Castling znn procedure public createPiece pieceColor game Colore fe ft PawnTransformation 2r pieceRind chess Piece as lt a Simple ove znr I piece fl Bishop znn War z nd King znn po chess Piece ae E Knight zrn begin R DS nil ni case pieceKind of Eee El EEE chess Piece Kind pawn P new chess Fawnipie w sh Al F ZonnonG ames onnonG ame chess move Pawn ransformation znn a H E F ZonnonGames ZonnonGamechess piece Pawn znn i HE F ZonnonG ames onnonGame chess urcansole ChessConsole znn a8 F onnon ames onnonG ame c
26. ors panel It is now possible to edit the content of each palette element to create your own custom palette 10 2 Program text options Lets now change the program text font size Use the NumericUpDown control element with name size to do this The new font size will now used for all characters in the text which belong to the currently selected kind of symbol Program Coloring Options Element Attributes Palette lee ee el st Tt ie e W Bold talic Screen Element comment number string Keyword predefined normal All T est Attributes Size E Family Courier New Change Program Sample Comme niE module A Var 1 integer begin ieis l wuryrita i i tawt Figure 10 4 The new program font size Lets change the program text font size Press the button Change in the controls group All text Attributes The standard font editing dialog box will appear Program Coloring Options Element Attributes Palette le oe el st Tt Le e W Bold Italic Screen Element comment number string Keyword predefined normal All T ext Attributes Size E Family Comic Sans MS Change Program Sample Comment module A var i integer begin i g Figure 10 5 The standard font editing dialog box Select a font family and or font size then press OK button The program text with the new font will appear in the Program Sample panel Program Coloring Opt
27. ouring after each key stroke is entered 4 2 Editor popup menu Each file has an associated tab with a popup menu onnon Builder E O x File Edit View Search Project Versions Help O W g tf fe p oped A E Board znn E Castling znn H Queen zmn E A chess ee Close Board 2nn H move The cc Close all except Board znn ialized chess E Capture znn Close a Castling znn ge ape siya Save Board znn z H PawnTransformation zr Qauthor nfs SimpleMove znn l Save Board znn as ce piece object che Save Board znn as HTML file Eo ogqame Board E Bishop znn Compile Board znn import util d Show History ban game Si Commit Board znn E i chess So Titec epos chess Mowe ch S chess Fann chess Rook chess Enight chess War pieceboxes array 2 of chess Piecebox i Massages a search Ln 14 Col 16 Ch 16 a Figure 4 5 Program editor popup menu E Project Files Closing files is quite flexible It is possible to close either the selected file Castling znn or close all files except the selected file Castling znn by using the menu items Close or Close all except Any group of opened files can be closed using the menu item Close when it is clicked the following dialog box appears Select files for closing E x i F ZonnonGames onnonG amechessimovet Casting zin i F ZonnonG amesZonn
28. pup menu will appear onnon Builder File Edit View Search Project Help D W El amp amp ela gt H e e g Create Mew Project Search Files Messages Figure 8 2 Popup menu for an empty project Another way to do this would be to select File New Project from the main menu item as shown below Zonnon Builder loj x File Edit View Search Project Help Open File Chrl 0 Save File Chrl 5 Save File s Mew Project Open Project Save Project Save Project 4s Close Project Recent Files Recent Projects j Exit r EE agez 5 Stack E Search Ln 1 Col 1 Ch l 5 Figure 8 3 New Project main menu item Now select a directory name for the new project and then enter the project filename Create New File Look in E ZonnonSamples SS Ba fs 2 x es Gi E Tools Ci Helloworld C_ghistory _Helloworld E Stackview F Helloworld zbp F Stackview zbp Filename Readwrite5ample zbp Open My Network Places Files of type Zonnon Builder Project zbp Cancel a Figure 8 4 Creating the Project File When the new project file name ReadWriteSample zbp has been entered the project is automatically given the default name ReadWriteSample Zonnon Builder 4 4 _ Oo x File Edit View Search Project Help 4 mj E a J Oy gt fa poe oone me Ready rites ample
29. relevant program text will be presented in the lower panel of Contents tab window The status panel will show the date and time attributes of the item The program text and attributes for the Version 1 2 of file HelloWord znn are shown below Zonnon Builder MEE File Edit View Search Project Versions Help rd ael gt Hallow orld zmn History E E BHE Hello orld a f Helloworld Versions amp Revisions content 1A ff 2004 1 7 004 qrr 2004 177r 2004 Tf ff a004 qA 2004 10 03 PM 10 10 PM 10 09 PM 10 09 PM 10 09 PM 10 08 PM MODULE HelloWorld YAR 3 ARRAY oO OF CHAR BEGIN WRITELN Hella world READLN 3s END HelloWorld Figure 9 2 2 The program text for the Version 1 2 of file HelloWord znn Similarly the program text and attributes for the Version 1 1 of file HelloWord znn are shown below Zonnon Builder E E _ O x File Edit View Search Project Versions Help i E at Sa ay Z A Hello orld znr History a Hello World Versions amp Revisions content S E Hetoword Version Date Time qrr 2004 10 09 PM 1 2004 10 10 Pe 1 2004 10 09 Pe 1 2004 10 09 Pe 1 2004 10 09 F HODULE HelloWorld VAR 3 ARRAY 50 OF CHAR BEGIN WRITELN Hello world READLN 3s END HelloWorld Version 1 1 Wednesday January OF 2004 10 08 53 PH Contents Messages E Search Figure 9 2 3 The program text for the Version 1 1 of file HelloWord znn Now lets look a
30. round The FindNext button can be clicked again to find the next instance of the text string and so on To replace a piece of text in the file select Search Replace from the menu item The various replace options will be presented Replace in File Replace with Replace IW Match case Match whole word Replace All Cancel Figure 5 6 The Replace Options dialog Use the FindNext or Replace buttons to skip or replace the text instance in the file 5 3 Line number search lt is also possible to find a particular numbered line in a file the first line is number 1 To find the line with a given number select Search Goto in the menu item enter the line number in the dialog box Go To Line 1 58 5 7 The Go To Line dialog box The program text will be scrolled and caret will located at the start of line number 11 6 Compiling a Program 6 1 Setting up the compilation options Lets open the project HelloWorld zbp file to compile the project Before compiling your project or program file you need set the compilation options To do this select the menu item Project Properties in the main Zonnon Builder menu Zonnon Builder E loj x Fie Edit View Search Project Versions Help C i i cS at E Build Ctrl F9 Compile Hellovorld znn Ctrl Shifk F9 fe Execute FQ AE Hello orld oft HelloWorld 2n Properties oystem string writeln Hello world readln s end
31. sions i uk Ctrl Copy Chrl C Paste Ctrley Ef Delete Del Editor Options Figure 10 1 The Edit Editor Options menu item on the main menu The editor options dialog box will appear Program Coloring Options Screen Element comment number string Keyword predefined normal ee ee st Tt oe e Bald Italic All T est Attributes Size fio Family Courier New Change Program Sample Comment integer Write text end Figure 10 2 The editor options dialog box Lets change the presentation of the keyword in the program editor The default keyword presentation is blue and in plain text To set the new presentation click on the red square in the Palette controls group and check the Bold check box The new representation of the keywords will shown in the Program Sample panel Program Coloring Options Element Attributes Palette lee ee el st Tt Le e Screen Element comment number string Keyword predefined normal W Bold talic All T est Attributes Size fio a Family Courier New Change Program Sample Comment integer write text end aA Figure 10 3 The new keywords presentation The colors in Palette can also be changed by pressing the Change button in the Palette controls group The standard dialog box for color editing will appear with the available Palette colors being presented in Custom Col
32. t the Diff tab window The top panel contains two file history lists which make it easy to compare the history of the program texts in the lists The differences between the file s versions and revisions is shown in the lower panel The program lines which are common to both files have a white background Program lines that differ between the files have different background colours A red background colour highlights items from the first history list and a green background colour highlights items from second history list The status line shows the number of compared items and the difference count This example illustrates the difference between Version 1 1 and Revision 1 of the HelloWord znn file fonnon Builder Fie Edit View Search Project Versions Help D E Ss S gt ee ol o Hello orld Hello world 1 7 2004 1 7 2004 1 7 72004 1 4 72004 1 7 2004 oH HelloWord zrn History E Helloworld zin 10 10 Pe 10 05 Pe 10 05 Pe 10 09 PM 10 08 Pe Tf 42004 1 2004 1 f 2004 1 ff 2004 177r 2004 10 10 FM 10 05 FM 10 09 PM 10 09 PM 10 08 PM lol x MODULE HelloWorld YAE 3 ARRAY 0 OF CHAR BE GIN WRITELN Hello world FE ADLN 3 END HelloWorld Diff Erom Yersion 1 1 to Revision 1 p difference blocka found Contents FL Diff Messages Search DOOS O l Ln 1 Col 1 Ch 1 a Figure 9 2 4 The differences between Version 1 1 and Revision 1 of the HelloWord znn file Lets look at
33. the Info tab window which shows information about the file versions The top panel contains the history list including the file versions whilst the middle panel contains the label The label gives short explanaition for the file version The bottom panel contains the comment from the file version The following Figure shows the version label and comment for Version 1 2 of the HelloWord znn file fonnon Builder E e ioj x File Edit View Search Project Versions Help L ae i db FE m A T SE HelloWorld znn History E Haad an a m Hello World Sin Helowork a TS a 1247420041010 PM Loo Label Version 1 1 0 0 Comment Output test was changed Contents T Diff SB Info Figure 9 5 The information for Version 1 2 of HelloWord znn file Whenever a file is saved the next file revision will be created for the file To refresh history lists just click the Refresh menu item of the History Window popup menu Zonnon Builder ee iol xj Fie Edit View Search Project Versions Help D W i a mr b aeaa BE Hello World a f Helloworld ot Hello orld znan History Close HelloWorld znn History Versions amp Revit Close all except HelloWorld znn History Version Lo o Close Refresh my 1 2 Restore a 3 Tiff enig 10 09 PM g 2 1 7004 10 09 PM i 1 2004 10 09 PM By 1 1 177r 2004 10 08 PM The simples fonnon progran MODULE HelloWorld VHRR 3 ARRAY 50 OF CHA
34. the project tree as shown below Zonnon Builder O x File Edit View Search Project Help D W li amp Bo gt ee ob Exe Fl Hellow orld H histon _Helloworld E stack lew z Hellow orld zbp Read rites ample zbp stack lew zbp SBE eare Figure 8 8 New file ReadWrite in the project tree Now press the right mouse button on this new folder icon and select the menu item Add New File Enter the new folder name ReadWrite znn in dialog box The znn ending to the file name indicates that the file contains Zonnon program source text Now you will see the popup menu shown below this can be used to include any file or exclude any file from the project fonnon Builder File Edit View Search Project Help OD W El amp S gt HE REET aye Bl Hello orld E history Hello orld E stack lew a Helloworld zbp Readvrites ample zbp z Shack View zbp Eis Rea a Readwite nn Open Files Save 4s PO Delete Rename Include In Project Compile Read vrite znn Show History Figure 8 9 File popup menu The file will be included in the project and it will have the source file symbol as an icon Now click on the Show Included Only icon in project tree toolbar Here is the project tree for the project fonnon Builder File Edit View Search Project Help i EE ES ly b HE ATAN AR Ready rites ample SER Readwite
35. urrent project item has a Project icon L The next items are the versions of the project each project version has a Project Version icon ml Every project history list item has a data and a time attribute Select the project Version 1 0 2 0 in the project history list The project label and comment will be shown at bottom of Info tab window Zonnon Builder _ Oj x File Edit View Search Project Versions Help D H amp amp Bo gt Be Project History m Chess Notebook Version information Version Date Time 1 0 2 0 ef 24 2004 4 46 Pe areg 2004 4 13 PM Label New chess notation implementation Comment The type STRING i used instead the type ARRAY OF CHAR for presentation of chess notation 7 Dif m Files Messages amp Search Oooo maoan g Figure 9 3 3 The information for Version 1 0 2 0 of Chess Notebook project Now lets look at the Content tab window The top panel contains the project history list including the project versions whilst the bottom panel contains the list of project version files Each element of the file list has the file version the file modification data and time the file directory onnon Builder Ioj x Fie Edit wiew Search Project versions Help D Wgl nap 3 P A E Project Histor H A Chess Notebook Version information Version Date Time Pe E 1 0 2 0 2 24 2004 4 49 PM ef 24 004 4 13 PM Fie Version Date Time Directory Capture
36. ve Move Zr ef e4 004 4 13PM chess Capture znn efe4 2004 446 PM A chess move Lastling znn i EE TIE 44a PM Achess move Pawn ranstormation 2Ar efe4 2004 446 PM Achess move Mowe znn ef 24 2004 446 PM chess mae Simple ove zan 2fe4 2004 473 PM Achess move Bishop 2nn l EPE TIE 4 13PM Achess pece Diff Erom Current file to Current file lo difference blocks i Content Go Diff Hi Messages Sn Stack E Search Ln 1 Col 1 Ch l Z Figure 9 3 4 The differences between Version 1 0 1 0 and Version 1 0 2 0 of the project If the files exist in both project versions and have same version number then the difference list single element has black color Else the different file versions are presented in the difference list with thier project colors 10 Editor Options 10 1 Program representation options The program editor supports a number of character attributes which can be set up to change the appearance of the text Program text contains the following lexical elements keywords numbers strings comments and predefined language identifiers Each of these elements has attributes associated with each of its constituent characters they are normal bold and italic fonts and the color All program text also has attributes for font family and font size To set up your own values of these attributes select menu item Edit Editor Options as shown below fonnon Builder File Edit View Search Project Ver
37. y of your choice Step 2 Execute the Setup exe program The program will install Zonnon Builder to the directory Program Files ETH Zurich ZonnonBuilder Step 3 Finally you need to execute the program ethz zonnon builder exe to start the Zonnon Builder The Zonnon Builder icon on decktop or in main Start menu may be used also for the execution FoannanBuilder Figure 2 1 The Zonnon Builder icon on desktop fg ETHZ b zonnon Builder UML4NET Figure 2 2 The Zonnon Builder icon in main Start menu Enjoy working with the Zonnon Builder and developing programs in Zonnon for the NET platform 3 Getting started 3 1 The main window structure When Zonnon Builder starts up you will see the initial empty window fonnon Builder AmE Fie Edit View Search Project Versions Help Dm Gest amp BS gt Tu Stack Q Search PO In 1Col 1Ch 1 E Pic 3 1 Empty Zonnon Builder window The central window panel will contains program file editors and file history viewers The bottom window panel has tabs for Messages Stack and Search The Messages tab is used to show messages from Zonnon Compiler The Stack tab is used to show the Zonnon program stack at the point when program execution was last terminated The Search tab is used to show text search results 3 2 Zonnon program from file To create a first Zonnon program click the New icon Lin main toolbar The empty program editor will be shown
Download Pdf Manuals
Related Search
Related Contents
Here PHILIPS/SAECO WARRANTY CERTIFICATE SOUTH AFRICA "取扱説明書" Philips AJ3110 Clock Radio La historia de Maxwell Marine User Manual - STI Support Site ブーツ一体型サーフドライスーツ FLAP DRY (フラップドライ)ご購入 KUDA 088270 holder H500BT USER MANUAL 2009-1-125_5p_0013_a.. Copyright © All rights reserved.
Failed to retrieve file