+ Reply to Thread
Page 1 of 4 123 ... LastLast
Results 1 to 10 of 40

Thread: Plugin request (pretty please :D )

  1. #1
    Licensed User Tim's Avatar
    Join Date
    Jan 2003
    Location
    london
    Posts
    6,950

    Default Plugin request (pretty please :D )

    Please please please could some one write a plugin that would scan the ASM file and work out what variables were declared and not used.

    Hi, its great to see you visiting our forum. Why not try Proton Compiler for FREE?

    Download the FREE version of Proton Compiler, Its called Amicus18 and its available from HERE

    Already using proton Compiler??? Get rid of these pesky messages... get LICENSED USER STATUS




    I would be more than happy to help work out the algo to figure out which var is not used.



    Thanks
    Tim


  2. If you're a Licensed user of PROTON DEVELOPMENT SUITE, apply for Licensed User Status to remove these pesky messages
     and get access to additional forum areas, Beta test downloads and more!

  3. #2
    Licensed User cgriffin's Avatar
    Join Date
    Oct 2003
    Location
    CA
    Posts
    1,249


    Default

    Tim--you could do that without the asm, couldn't you? Just looking at the basic code...

  4. #3
    Licensed User mister_e's Avatar
    Join Date
    May 2005
    Location
    montreal, canada
    Posts
    468


    Default

    Says you define 50++ Variable, but 5 of them aren't use in your Basic code... How many time you'll waste to find them in your 500++ code lines?

    Tim is looking for an automated solution. Kind of multiple Find/Replace.. without the 'replace' function
    Steve

  5. #4
    Licensed User cgriffin's Avatar
    Join Date
    Oct 2003
    Location
    CA
    Posts
    1,249


    Default

    I was not talking about a ctrl-F find, but rather, an automated plugin. It seems to make more sense to me to look for it in the Basic code before you compile rather than the asm, forcing a second compile.

    It was a comment on his description "scan the asm..."

  6. #5
    Licensed User mister_e's Avatar
    Join Date
    May 2005
    Location
    montreal, canada
    Posts
    468


    Default

    probably a variant or extension of BISVS where you have access to both System and UserDefined Variable?

    Not sure of the whole requirement though
    Steve

  7. #6
    Licensed User normnet's Avatar
    Join Date
    Jul 2004
    Location
    Minnesota USA
    Posts
    832


    Default

    One version would be the plugin would auto select each variable and search to see if its found and not commented out to be certain it's a used variable.

    Is this what is requested or is the plugin to also find uncalled lines of code which contain variables that are not used? Difficult.

    Norm

  8. #7
    Licensed User Tim's Avatar
    Join Date
    Jan 2003
    Location
    london
    Posts
    6,950


    Default

    The reason I said the ASM file is that often vars are declared in INC files. This does though lead to problems. In an asm file it would be difficult to work out what was a user var and what was say an symbol or a part of an array.

    So with hind-site it would be better to scan the Bas file and then look through all the INC files as well.

    Once you have your variable list (from the use of DIM...) you parse the whole program and INC files again, this time incrementing the times you see a variable.

    You could also work out looking at the asm file the address and get your self a map of which bank the variable is. Some association tests and a decent algo and you could work out a recommended Dim list to cut down on unnecessary bank switching.

    JohnB is the man to do it as he already has a lot of experience in doing this stuff but I'm loathed to ask as he already does so much.

    Really you could glean a lot of very good info from it all to improve your program coding, making your code even leaner and faster.
    Tim

  9. #8


    Default

    Tim, take a look at PowerGrep. It uses regular expressions to find and/or manipulate text in one, or many, files. It will find text based on the expression(s), which can be as complex an algorithm as necessary. Used it for years, very useful.

  10. #9
    Licensed User johngb's Avatar
    Join Date
    Oct 2003
    Location
    Surrey, UK
    Posts
    1,340


    Default

    Just spotted your request - it should be very easy.

    I already have a class which will build a list of all the variables in a source file. I also have one which will list all the includes and I have a number of search routines which I'm sure could be adapted.

    Just need to think about the GUI. I guess you need a list of Variables and where they were declared and the number of times they were used.
    JohnB

  11. #10
    Licensed User Tim's Avatar
    Join Date
    Jan 2003
    Location
    london
    Posts
    6,950


    Default



    Great John

    Personally All I want is something that will list up all the variables not used in the program, if you also have a list of how often the other vars are used even better. Finally it should be always on top and of you can make it hypertext to the offending variable so I can delete it I would be one happy chap.

    Now when your bored then perhaps it could be added to by also listing the bank there in and I could also come up with a system to visualise the closeness in the code of one variable to another.

    Sort of a separate display or a translucent layer like in fineline were a little char A 0 1 2 3 etc hovers over every var so you can see at a glance what bank its in.

    Hmm it would require some thinking about, next time I see you we can talk about it.
    Tim

+ Reply to Thread
Page 1 of 4 123 ... LastLast

Similar Threads

  1. Plugin Packer Request
    By johngb in forum Mecanique - IDE
    Replies: 1
    Last Post: 4th August 2009, 12:50
  2. No Dongle Request
    By crankshaft in forum Proton Plus Compiler v3
    Replies: 1
    Last Post: 15th July 2009, 14:20
  3. Plugin request/suggestion...
    By cgriffin in forum Third Party Developments
    Replies: 3
    Last Post: 10th May 2009, 11:17
  4. Another Plugin Request... (Please)
    By cgriffin in forum Third Party Developments
    Replies: 0
    Last Post: 30th July 2008, 17:40
  5. A minor UI request
    By johngb in forum Mecanique - IDE
    Replies: 2
    Last Post: 16th December 2004, 15:45

Members who have read this thread : 5

Actions :  (Set Date)

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts