Help Topics for Source Code Explorer 1.74E for Pascal and Delphi

Why use the Source Code Explorer?

Installation and system requirements.

Integrating Source Code Explore in Delphi-IDE

Structure diagram window.

Searching in the structure diagram window

Search result list

Printing of structure diagrams.

Menu

Button Panel

Configuration

Licensing agreement.

Basic version for free.

Full version for free.

Registration.      New: Get your registered version within hours!

Outlook for future versions.

Author

Dieses Programm ist auch in deutscher Sprache erhältlich:

http://ourworld.compuserve.com/Homepages/wviehmann/main.htm.

Many thanks to

Christopher Gold

Chair in Geomatics

Laval University

Quebec

Canada

for them friendly assistance by translating the program documentation. If you find any language faults, they are mine because I add text continuously.


Why use the Source Code Explorer (SCE)?

SCE  is used to depict Pascal source code as Nassi-Shneiderman diagrams. To create these diagrams, you only have to load the source code similar to an editor. Supposition is a compatible source code.

You can open the file by choosing the command ‘open‘ in the menu ‘file‘ or with the right mouse button click on a file in the explorer and choosing the command ‘SCE‘ in the menu ‘Send to‘. You can also load a file with SCE by double click on different file types. You must choose this option in the dialogue registry .

A structure diagram window will open which shows the source code as a Nassi-Shneiderman diagram. With the tab-sheets you can choose to view either the source code or the Nassi-Shneiderman diagram.

If  SCE recognises a complete unit, it will be shown additionally in a tree-structure like the Windows 95 explorer. So you get a tremendous overview of the unit, even if it contains thousands of  lines of source code.

The diagrams depicted can be configured. Choose from the menu structure |  Monitor | depiction  to reach that dialogue .

You are able to print the diagrams or a part of them.

SCE  is for the depiction of Pascal source code as Nassi-Shneidermann diagrams. To create this diagrams, you only have to load the source code similar to an editor. Supposition is a compatible source code.

There will be open a structure diagram window which shows the source code as Nassi-Shneiderman diagram.

With  the tab-sheets you can choose the view of the source code or the Nassi-Shneiderman diagrams.

If  SCE recognises a complete unit, it will be shown additional in a tree-structure like the explorer of Windows95. So you get a tremendous overview of the unit, even if it contains thousands of  lines of source code.
The depiction of the diagrams can be configured. Choose from the menu structure | monitor depiction to reach that dialogue.

You can make  printouts of the diagrams.

SCE can be adjust for the specific version of Pascal. That can be done with the buttons Delphi, TP6/7 and TP4/5 on the panel in the main window. Further buttons can be customised and made visible in the dialogue recognise. Normally the setting Delphi will produce always a correct diagram. Problems can occur when for example,  in a source code for Turbo Pascal 7 a word is used, that in Delphi is a reserved word what initiates a structure.( for example: try). So should there be any problems while generating a diagram, mind the correct setting. The specific dialogue allows customising SCE for other Pascal dialects as well.

The following tasks can be done with the SCE:

-Creating  program documentation.

- Analysing unknown programs, even if there are no comments.

- Searching for logical faults.

- Help when debugging.

This list will be extended, with additional features of  future versions of SCE.


Installation and System Requirements.

SCE is a 32-Bit-program and requires  Windows 95/98 or Windows NT.

For installation start ‘SCE.EXE‘ (Full version: 'SETUP.EXE'). You will get the following files:

Prgedit.exe

Prgedit.hlp

Readme.txt

Register.txt

Demo.pas

ureg.dat or reg.dat

If you want to produce the diagrams direct from Delphi, with the source code you are just editing, go to Integrating SCE in Delphi..


Integrating Source Code Explorer in the Delphi-IDE

After installation of SCE start Delphi and proceed as follows:

-Choose from the menu Tools | Tools ...

-The  dialogbox 'Tools options' appears. Click on the button 'Add ...'.

-The dialogbox 'Tools properties' will appear. Fill in '&SCE' in the field 'Title'.

-Click the button 'Browse ...'.

-Search the file 'prgedit.exe' in the installation directory and choose it.

-Fill in the following text in the field 'Parameters: ‘$SAVE $EDNAME'. (Mind that there is a blank between the two macros.)

You can now produce a structure diagram from the source code what you are just editing. Choose from the IDE-menu Tools | SCE. The source code will be saved to your hard disk by Delphi. Then SCE will be started with the path of the file what you wish to examine as parameter. The desired diagram will be shown.


Structure diagram window.

The  structure diagram window shows a Pascal source code as a Nassi-Shneiderman diagram. The diagram will be created by simply opening  the source code. The window shows in the title bar the name and date stamp of the file, the language setting and the setting for the compiler switches. SCE accepts any Pascal source code, but orients to the standard ‘Turbo Pascal’ and ‘object Pascal’ from Inprise (formerly Borland). To create the diagram correctly a compatible source code, which does not contain any syntactical faults, is required.

With  the tab-sheet source code you can show the source code, with line numbering left of a vertical black line, or the diagrams of  the same source code with the tab-sheet  structure.

The  structures

- block

- if-Then-Else

- repeat

- for

- while

- case

are shown as coloured Nassi-Shneiderman diagrams.

Additionally the pseudo structures

- with ... do

- try...

will be integrated in the Nassi-Shneiderman diagrams.

If  SCE recognises a complete unit, it will be shown additionally in a tree-structure like  Windows95 explorer.

This tree-structure is organised by the following objects:

- unit

- interface

- implementation

- type

- var

- const

- procedure

- function

- constructor

- destructor

- block (begin...end)

The block objects contain coloured Nassi-Shneiderman diagrams. To accord with the settings in the Dialogue monitor depiction configuring the program appears in all details as a tree diagram. In the tree diagram are little plus signs on a yellow background which will show more details if you click on them. The plus signs become minus signs, if you wish to hide the additional details. On the last level of this tree-structure may appear a very large Nassi-Shneiderman diagram. From a specific size on, the minus-signs appear on all four edges of  the structure. That avoids useless scrolling back while searching  in the diagrams.

Within this window you can mark an object(a part of the tree or a diagram) for an operation(at the moment only printout of the object). Parts what you cannot mark, cannot be used for an operation. Mark an object by a left mouse click in the upper left corner of the object.

From the structure diagram you can print  (only full-version). This printout can be configured in the dialogue box structure | printout | options.


Search functions in the diagram.

SCE provides a lot of search functions. You can search for line numbers or words. The line where one or more items are found, will be depicted underlined.

Choose from  the menu Search | Line number if you want to search for line numbers. The following dialogue will open:

Search line number.

In this dialogue you can give one or more line numbers. The founded line will be depicted underlined until a new search will be started. Empty source code lines will not be found, because they will not be taken over in the diagram. There are the following options for the search:

-Search only in selected parts

Search will only be conducted in the selected  part.

-Search all at once.

All line numbers will be searched for at once. The first founded line number will be shown. If you do not choose this option, you can continue search while choosing from the menu Continue | Search .

-Close other parts.

All parts where none of the searched line numbers where found, will be closed.

Choose from the menu Search | Word if you want to search for words. The following dialogue will be opened:

Search words.

In this dialogue you can give one or more words what are you searching for. The lines where words are founded will be underlined until a new search will be started. There are the following options for the search:

-Search only in selected parts

Search will only be conducted in the selected  part.

-Close other parts.

All parts where none of the searched line numbers where found, will be closed.

-Search all at one time.

All words will be searched for at once. The first founded word will be shown. If you do not choose this option, you can continue search while choosing from the menu Continue | Search .

-Case sensitive search

This search differentiates uppercase from lowercase.

-Make list

A list with search results will be produced. If a list for that diagram already exists, it will be added to this list. In this list you will also find information about search criteria and the location where the words where found. If you choose this option, the option search all at once will be set automatically.

-Whole words only.

The search items will not be founded as a part of words.


Search result list.

For every structure diagram window a search result list will be produced, if you choose the option make list while searching. This window will be shown, if you choose the menu Search | Search results. This list contains the search items and the search criteria in the head, followed by the founded items with information about the location where they where found. Choose from the menu Search | Print search results if you want to get a hardcopy of a list. You can also edit this list. (only full version).

Choose from the menu Search | delete search results, if you want to delete this list.


Printout of  structure diagrams.

Starting in a structure diagram window you can make a printout (only full-version. In the shareware version and the basic version, you can only make a demo printout.).

Very helpful while analysing source code or when you have a small monitor, is the feature to print marked parts of the structure.

 Independent of the depiction in the window (hiding levels), the structure will be printed in all details. The pages will have a footnote, giving the file name, the date stamp, the language settings, the compiler switch settings and the page number.  When part of the structure exceeds the width of the printed page, additional pages will be printed and numbered following the alphabet. For example: 7A, 7B, 7C....

This will help to stick the pages together. As needed a reference-diagram can be printed out, depicting the rough tree-structure of the diagram, and containing the printout page numbers. The printout will be supplied with a filing margin. This printout can be configured in the dialogue box structure | print | options .


Menu structure.

File | Open

Opens any source code written in Pascal and generates  a Nassi-Shneiderman diagram of it, shown in the structure diagram window .

File | Close

Closes the active  structure diagram window .

File | Exit

Closes the program.

Structure | Recognise

Opens a dialogue box where the Recognition of reserved words can be switched on and off.

Recognise .

Structure | Monitor-depiction

Opens a dialogue box where the structure depicted on the monitor can be  configured .

Structure | Print options

Opens a dialogue box where the structure  depicted on the printer can be  configured .

Structure | Printer settings

Opens a dialogue where the printer can be  configured .

Structure | Print

Prints the diagram

Look also: Printout of structure diagrams.

                   Print options

Search | Line number

Opens a dialogue, where you can enter  one or more line numbers to search for.

Search | Word

Opens a dialogue, where you can give one or more words to search for.

Search | Continue search

Continues a started search.

Search | Search results

Shows the list of search results, if available.

Search | Print search results

Prints the list of search results, if available.

Options | Registry

Opens a dialogue where the double click action for different file types can be  set .

Window | Tile vertical

Shows all windows side by side.

Window | Tile horizontal

Shows all windows one on top of the other.

Window | Cascade

Shows all windows overlapping.

Window | Arrange icons

Arranges all icons.

Help | Contents

Shows the table of contents of the helpfile for  ‘Source Code Explorer’.

Help | Demo printout

Makes a demonstration printout of the file provided. Printouts of  any diagram is possible only with the full-version.

Look also: Printout of structure diagrams.

                   Print options

Help | SCE Homepage

Establishes an internet connection to the SCE Homepage with your internet access software.

Help | Online Registration

Establishes an internet connection to the registration service ‘Shareit‘. There you can register SCE with your credit card.


Button Panel

With the button panel you have quick access to the following functions:

The left button group:

The first button opens the dialogue for loading a Pascal source code.

The second button starts the printout of the actual window.

The third button starts a search for one or more words in the actual window.

The fourth button continues a search.

The fifth button switches on/off between the depiction of source code with/without line numbers.

The middle button:

The single middle button controls the recognition of compiler switches. The following compiler switches can have an else part:

-{$IFDEF}

-{$IFNDEF}

-{$IFOPT}

By clicking the button, the caption will change:

-{$IFXXX} in blue

-{$ELSE} in yellow

Only when the compiler switches have an ‘else part’, the setting of this button will be notified when creating the diagrams. In the first case, the ‘if part’ will be changed into a diagram, in the second case the ‘else part’. A change of this setting will only become effective for new to be opened windows. In the tile bar of the structure diagram window  you can see the active setting when opened the window.

The right button group:

The right button group has three to five buttons. Depending on the settings in the dialogue Recognise ,   the buttons allow the setting of the Pascal version for the source code. Normally with the setting Delphi, all source codes will produce a correct diagram. In the case of an older Pascal source code that uses a  reserved word in Delphi, a wrong diagram can be produced. In that case you have to choose the correct language setting. Also this setting will only become effective for new to be opened windows. In the title bar of the structure diagram window you can see the active setting when opened the window.


Configuration.

It is  possible to configure the depiction of the diagram on the monitor as well as on the printer, the recognition of reserved words (language setting) and settings in the registry (double click on file types).

Dialog box: Registry

You reach this dialogue with the menu Options | Registry. In this dialogue you can relate double click actions to the file types ‘*.pas‘ and ‘*.dpr‘ on SCE. Therefore the registry will be changed. SCE can remove this settings but not restore the old settings. You do not need to make this settings (choose the cancel button), because you can start SCE with the right mouse button (‘Send to‘).

Dialog box: Recognise

You reach this dialogue via the menu Structure | Recognise. In this dialogue you can switch on and off the recognition of reserved words. You can do this for the two buttons ‘Name1‘ and ‘Name2‘. The caption of the buttons can be changed. This buttons can be made visible on the panel in the main window by the specific settings in this dialogue box. With this settings you can adjust SCE for any other Pascal dialects.

The settings of the buttons ‘Delphi‘, ‘TP6/7‘ and ‚‘TP4/5‘ can not be changed. The specific settings will not become effective by clicking the button in this dialogue, but by clicking the buttons on the panel in the main window. The settings for already opened structure windows will not change. They become effective for new opened windows. The setting for each window will be depicted in the title bar behind the file name.

Dialogue box : Structure depiction.

You reach this dialogue with the menu Structure | Monitor depiction. It offers the following settings:

Page depiction:

- Hide levels when opening the window .

By choosing this option, a very compact, recognised unit will be depicted. All details are hidden. This means for example, that a procedure is only shown with it‘s head. On the upper left edge there will be a little yellow

square with a plus-sign in it, meaning, that there are more details available by clicking on it. In this way you can show only those details, of interest to give you an overview especially if you have very huge units. Therefore this setting is recommended.

-Line numbers

By choosing this option, the original line number from the source code will be shown to the left of the line in the structure. This is very useful while editing the source code when you want to know where you are in the diagram. This is also useful while debugging. Line numbering can be switched on and off even if the window is open.

-Hide line comments

Comments, initiated with  // and stretching only to the end of the line, can be hidden  in the diagram.

-Case-structure vertical

Case-structures can expand very much in horizontal direction, if depicted correct. That is the reason why SCE offers the option to show this structure vertical.

-Depiction of the If-parts

There can be set a character for the depiction of the then- and the else-part in the diagram. That is useful if the diagram is in another language.

Page scrolling:

Depending on the used hardware or operating system, the depiction of the diagrams can be very slow while scrolling. That is the reason why SCE offers the following options to slow up scrolling and to adjust to the available hardware.

-Quick scrolling

If you choose this option only the contours of the diagrams will be shown while scrolling.

-Show source code in procedure heads while quick scroll.

Shows the source code in the heads of procedures while quick scrolling.

-Fall back time to complete depiction.

If there are no scroll commands from the mouse or the keyboard after this time, the complete contents of the diagrams will be shown. This is an adjustment to your individual hardware.

Button panel:

-Font...

Opens a dialogue box to choose the desired font for the structure diagram.

-Colours...

Opens a further  dialogue box  where the colours for the specific agglomeration depth  can be set.

See also: Structure diagram window

Dialogue structure print options.

You can reach this dialogue box with the menu Structure | Print options. The dialogue box offers the following  settings:

Page print:

-Reference diagram

Immediately after printing the structure diagram, a reference diagram can be printed. It shows the tree-structure of  the source code, whereby the numbers of the print pages of the specific objects are given.

-Line numbers

With this option you get the original line number from the source code left of the line in the structure-diagram.

-Print selected object

Only the selected part of the structure will be printed.

See also: Printout of  structure-diagrams

-Head line

You can specify a text what will be inserted on top of every printed page. You can also specify that this text will be separated by a line.

-Foot line

You can specify a text what will be inserted on the bottom of every printed page. You can also specify that this text will be separated by a line.

-b/w printing

You can specify that the diagram should be printed in black and white.

 Page settings:

-Head distance

Here you set the distance of the printout from the top of the sheet in tenth of  millimetre ..

-Foot distance

Here you set the distance of the printout from the bottom of the sheet in tenth of  millimetre ..

-Filing margin

Here you set the width of the left filing margin in tenth of millimetre .

-Right margin

Here you set the width of the right margin in tenth of millimetre .

-Print character height

Here you set the height of the print characters in tenth of millimetre .

 Page printer problems:

Some printer device drivers make faults while calculating graphic printouts. In some cases, this faults can be eliminated by using a vertical or horizontal correction.

Dialogue colours.

You reach this dialogue box  with the menu Structure | Monitor depiction | Colours. In the diagram the different  agglomeration depths are differentiated by colour.  A repeat-structure inside an if-then-structure will be coloured corresponding to the number 2 in the dialogue box. The colour of the specific agglomeration depth can be changed with the button ‘Change...‘. A colour selection dialogue box will be opened where you can select the colour and also define your own preferenced colour. The variety of colours depends on the features of  your graphic adapter and your monitor settings.

Agglomeration depths of more then 12 will start again at 1. The agglomeration depth 13 will be depicted with the colour of depth 1. The settings in this box will also be effective in printouts.


Licensing agreement.

Shareware version:

This software underlies the copyright terms.

The shareware version of  ‘source code explorer ’ may be given to anyone. You may not make any changes to the program. The program may only be passed on with all files which belong to it.

The author is not liable for any damages, originating from running the program ‘source code explorer ’.

Full version:

This software underlies the copyright terms. Registering this program allows you to make security copies for your own use only.

The full version will be sent as a patch to the customer by e-mail. The customer is not allowed to pass the program to other people. But the program can be sold. The customer must tell the author the name and the address of the new customer. Furthermore the seller is to make the contents of this licence agreement as a stipulation for sale.

The program may only be used on one computer at one time.

Also the full version may not be changed in any way.

The author is not liable for any damages, originating from running the program ‘source code explorer '.

The author does not provide any warranty for the function of all program functions. The author assumes  a reliability, by recognising source code, of more then 99%.

 Support will be conducted by e-mail only.

Small updates are free and will be published as patches in the internet. They can be downloaded by the customer.

Any violation against this licensing agreement will cause the loss of the right to use SCE, without getting money back. Also no more updates will be provided in that case.

Basic version:

This software underlies the copyright terms. Registering this program allows you to make security copies for your own use only.

The user of the basic version will get a key file by e-mail The user is not allowed to pass the program to other people. But the program can not be sold.

The program may only be used on one computer at one time.

Also the full version may not be changed in any way.

The author is not liable for any damages, originating from running the program ‘source code explorer '.

The author does not provide any warranty for the function of all program functions. The author assumes  a reliability, by recognising source code, of more then 99%.

 Support will be conducted by e-mail only.

Updates can be made by downloading the new shareware version and using the key file

Any violation against this licensing agreement will cause the loss of the right to use SCE.

See also: registration .


Registering for the free basic version.

Registering for the basic version of SCE is free. Send the file ‘basic.txt‘ to the author by e-mail. You get back a key file also by e-mail. Copy this file into the program directory. SCE recognises this file on the next start and all time loops are switched off. You can get updates for your basic version by simply downloading the newest shareware version from my website. You do not have to request a new key file. As a constantly user of the basic version you are welcome and there is no obligation or expectation to register for the full version in future. I will try to provide support for the users of the basic version. But you will have patience with the fact, that the users of the full version do have priority.

Please mind the licence agreement for the program.


Full version for free..

For that you have something to do: Report me a fault of SCE by recognising a valid Turbo Pascal or Delphi source code as the first. Send me the compatible source code, which causes the wrong depiction in SCE by e-mail. After recognition you get the full version on the customary way with all update rights If you are already a registered user of the full version, you get the next great update without paying any charges.

program author


Registration.

New: Get your registered version within hours!

Advantages of the full version :

-no time loops.

-printouts of any structure diagram  optional with reference diagram.

-virtually  unrestricted size of loadable files.

-small updates are free and will be provided as patches on the internet.

To get the full version of  ‘Source Code Explorer’:

Direct from the author:

1) Fill out the file ‘regeng.txt‘ and send it by mail to the  program author. with  79,-US$ (or DM 149,-) in the letter (you may ask the program author. for the current price).  You will receive the full version as a patch by e-mail. If you wish or when problems with the patch you can get the program by airmail without any additional costs. Anyway it is very important that you provide your full mail address.

or

2) Transfer 79,-US$ (or DM 149,-) (you may ask the program author. for the current price) to the following bank account:

Deutsche Postbank

bank code number: 370 100 50

account number: 251263-505

account holder: Wolfgang Viehmann

Fill out the file ‘regeng.txt‘ and send it by e-mail to the  program author. Give a hint in the e-mail that you have transferred the money. You will receive the full version as a patch by e-mail. If you wish or when you have problems with the patch you can get the program by airmail without any additional costs. In anycase it is very important that you provide your full mail address.

Online registration:

Go to my website http://ourworld.compuserve.com/Homepages/wviehmann/eng.htm  and follow the link Online registration.  You can also register on-line if you choose  the menu Help | Online registration. A internet connection to the following address will be stabilised:

http://www.shareit.com/programs/102649.htm

At this service you can register SCE with your credit card.

If you do not have access to the Internet, you can register via phone, fax or postal mail.

Please print out the file ‘ShareIt.txt‘, and fax or mail it to:

Shareit!

element 5 AG

Habsburgerring 3

50674 Koeln

Germany

Phone:	 +49-221-2407279

Fax:	+49-221-2407278

E-Mail:	register@shareit.com

USA customers may also order by calling 1-800-903-4152 (9am-5pm). No technical support can be

given at this number. US check and cash orders can be sent to our US office at

ShareIt! Inc.

PO Box 844

Greensburg, PA 15601-0844

USA

On the day the registration reaches me from the registration service, you get the full version as a patch by e-mail. If you wish or when you have problems with the patch, you can get the program by airmail without any additional costs. In anycase  it is very important that you provide your full mail address.

Please mind the licence agreement for the program.


Foresight for future versions.

The following features are planned for future versions of the  ‘source code explorer ’:

- editing in the diagram.

- inserting from user defined folders.

- moving of  structure elements by Drag and Drop.

- further  structuring of the interface of units.

- depiction of complete projects.

You have the chance to influence the development of the program by telling your proposals the  author.


Author:

W. Viehmann

Hubertusstr.18

D-52525 Heinsberg

Germany

eMail:

wviehmann@compuserve.com   daily

PStruktor@aol.com

w-v@online.de

WWW:

http://ourworld.compuserve.com/Homepages/wviehmann/eng.htm

http://members.aol.com/PStruktor/Struktor.html

 From this website you can download the latest version of the program. Also you get the latest information about the program.