www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/29/15:17:34

Message-Id: <m10cw83-000S24C@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: "Thiago F.G. Albuquerque" <thiagofga AT ambr DOT com DOT br>, djgpp AT delorie DOT com
Date: Thu, 29 Apr 1999 15:37:12 +0000
MIME-Version: 1.0
Subject: Re: RHIDE: Sugestion: prototype completion
CC: Endlisnis <s257m AT unb DOT ca>
In-reply-to: <3.0.5.32.19990429113258.00803c00@200.252.238.1>
References: <37275C2B DOT CEC5A114 AT unb DOT ca>
X-mailer: Pegasus Mail for Windows (v2.54)
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

"Thiago F.G. Albuquerque" <thiagofga AT ambr DOT com DOT br> replied to
Endlisnis <s257m AT unb DOT ca>:

> >    I was forced to use VB5 at work.  I don't like BASIC, but the
> interface is
> >very nice.  It uses a similar interface to VC++6.  If you type the name of
> a class
> >object and a '.' (as well as  "->" in C++) and it lists all of the public
> members
> >of the class.  Also, if you type the name of a function it doesn't
> actually type
> >out the prototype, but prints the syntax just below the cursor in a small
> "Tool
> >tip" style window.
> 
> You know, when the are compiler errors, and you press enter over an error
> message in MessageWindow... then the cursor goes to the line the error
> refered to. The line it highlighted and... the error message is displayed
> in the bottom line of the editor window! (That's where I wanted to get to)
> Since RHIDE doesn't have "ToolTips", we could use that line to display the
> prototype.

If any body needs sLisp commands to print text in this line I can add it.
 
> >It also offers word-completion with Ctrl+Space (like the
> >macros in rhide/setedit) where if I typed "po" it would show a small drop
> down
> >list with
> >popen
> >pow
> >pow10
> >pow2
> >in it (these were the libc entries starting with "po").  You could then
> select one
> >and press enter, and it would finish the function name, then show the
> syntax.  It
> >may be silly to use this for 3-5 character function names, but it would be
> very
> >nice for weird classes with long member names.  But it would have to
> actually scan
> >the code for prototype definitions (so it could get the local
> functions/classes).
> 
> I don't think scaning the code is a good idea. 

I agree. Currently I'm working in some stuff about fonts and code pages, when 
that's finished I'll continue with my work to support "tags". I think the 
right way to do it is using tag files. In this way the user can control when 
the scanning is done. Additionally tag files is something very used and you 
get a lot of information.

>It is too complex, and
> probably too slow. (Have you ever used VC++'s WizardBar?) The only example
> of fast code scanning I've ever seen is RHIDE's "Goto to Function". I don't
> know how SET implemented that, but the result is just perfect. The docs
> mention some "heuristic"... 

I use a simple algorithm based in the balance of { }. I also look for 
comments and strings (to avoid cases like print("{"); // { ). So what I do 
isn't a real C code parsing. If the code is correctly typed (no unbalanced { 
}) the algorithm works very well.

> VC++ probably uses some brute force algorithm,
> I guess; that's why it is too slow.

Probably they parse the code as the compiler does.
 
> My idea was RHIDE to keep a list of header files in which to search for the
> matching prototypes. For instance, my list would have all the libc headers
> (or I could merge them in one file) and allegro.h. Then if you wanted your
> own functions to "join the game", you could add your headers to the list.

You can use tags for it too.

If any of you doesn't know about tags just get a copy of exhuberant C tags, 
it compiles with djgpp and is excellent. If the author adds an extension that 
I propposed I can even make a class browser using the tags file.

SET 
------------------------------------ 0 --------------------------------
Visit my home page: http://welcome.to/SetSoft
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(5411) 4759 0013

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019