Page 1 of 1

Hunt down my functions in a project

PostPosted: Thu Dec 27, 2018 12:46 pm
by Marc Venken
Fiveedit can give a full function list.... (have seen it)

But is there some utility that will show all used functions that have been called when the start function is used?

ex. In a menu there is function Customers() I want a list off all functions that will be called when I execute only this function.

Why, I'm converting a large program with many hundreds of functions, and also 70 menu options. I want to start my converted 32 bit with only the most basic options working, and from time to time I want to update the rest of the program...

I only want 10 % of the program working as fast as possible and the rest should be FW new functions and new way of programming. (Old way is not good)
Only disable a menu item will give the function also in a list when I want to convert to new way.

ex. In commander is search for global " Index on" and If I could only have than the 10% functions that are needed, the conversion speeds up. Now I have the full 100% of code and functions.

I hope this makes sence ))

Re: Hunt down my functions in a project

PostPosted: Fri Dec 28, 2018 5:55 pm
by James Bott
Marc,

There are two very old (1990s) programs that do cross reference reports. I think this is what you are looking for. However, they are both 16bit apps so you are going to need an old computer to run them. One is called Click and the other is called Cross. I have copies of both I can provide.

If you don't have an older computer that can run them, I do. If you want to send me the code I can run them for you.

I suggest that this is a good time to think about writing your new app using OOP techniques. It makes everything much simpler, although there is a learning curve, but the payback is huge. If you send me some examples of your code, I can give you a better idea of how much you can benefit. I have cut the number of lines in old source by 50% or more regularly, by converting to OOP.

James

Re: Hunt down my functions in a project

PostPosted: Sat Dec 29, 2018 12:11 pm
by Marc Venken
James,

I'm so convinced of OOP..

For now I want to get the old 16 bit working in 32 bit. (I have it partially) With 10 % done, I can start using it in dayly situation.

The rest will be a complete rewrite with function and viewing from te forum.

At this moment i'm into searching and changing all my ntx to CDX. Do it with MultiEdit and global search. (Works)

Re: Hunt down my functions in a project

PostPosted: Sat Dec 29, 2018 12:23 pm
by Marc Venken
James,

Short explanation of my goal...

I have a personel invoice program for my business.

During the year's the program has become big and has many functions.

Now I want to use the new FWH techniques and therefore go into 32 bit. I have I partialy working, but I need more conversion to get it opperational for dayly use in order to
make invoices, client folowup... (10 % program is needed)

All rest (90%) will be newly written from start as functions that are more needed. (like statistics) There a so many new functions and techniques that I have seen/looked into that
I surely will use.

I see all FW programming as a hobby (I have non commercial use) Just like to do it for my small business ))

Re: Hunt down my functions in a project

PostPosted: Sat Dec 29, 2018 12:37 pm
by James Bott
Marc,

Ok. While you are doing that, start thinking about the real-word objects in the domain. Assuming this is your sports application, real-world objects might be player, coach, equipment, field, team, league, game, invoice, etc. Then write down the atributes and behaviors of each. You will need this to help you build your classes later.

James

Re: Hunt down my functions in a project

PostPosted: Sat Dec 29, 2018 6:39 pm
by TimStone
Marc,

In Ultra Edit ... make sure you have ALL used .prg files in a project.

To find all uses of a function, do a search in All Files. You should then see a list of each occurence, and clicking on it should open that code ... or you can do a simple replace.

I use UE Studio, but use this all of the time to locate every occurence of a function.

If you wish to see a list of all functions, do the same search for " FUNCTION " which is what you use to create each one in your programs. Again, you can do this as a search across ALL files, so your list would be of all the functions that exist, but since you only define them once in the project, you would not get duplicates.

Of course in UE you can also turn on ( check View - Windows/Toolbars ) the function display on the right side of your editor that shows all functions found in that .prg.

Tim

Re: Hunt down my functions in a project

PostPosted: Sat Dec 29, 2018 6:51 pm
by Marc Venken
Tim,

Very usefull tips !! Makes my work flow easier. Thanks