Go to Post Who cares about the score? The score is just numbers on a board, the exciting part is watching the robots interact and seeing robots( and more importantly, people) do the impossible. - Herodotus [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 26-01-2004, 16:07
echos's Avatar
echos echos is offline
Jack of all trades
#1125
Team Role: Programmer
 
Join Date: Dec 2003
Location: San Diego, CA
Posts: 61
echos will become famous soon enough
Send a message via ICQ to echos Send a message via AIM to echos Send a message via MSN to echos Send a message via Yahoo to echos
Re: NRG Code Repository

Thank you...

Dang your quick when it comes to changes.
__________________

Entity Hosting Staff
http://www.entityhosting.com/
  #17   Spotlight this post!  
Unread 26-01-2004, 16:10
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Re: NRG Code Repository

Could you possibly make it highlight C code also?
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"
  #18   Spotlight this post!  
Unread 26-01-2004, 16:10
Guest
 
Posts: n/a
Re: NRG Code Repository

How?
  #19   Spotlight this post!  
Unread 26-01-2004, 16:14
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Re: NRG Code Repository

Quote:
Originally Posted by SilverStar
How?
I'm not excellent in PHP, but I'm pretty sure there's a way to search for certain strings, and if it's found, just color-code it. Kinda like:

PHP Code:
$text strtext("$filename");
 
if(
$text){
  
explode("void""<font color='#0000FF'>void</a>");

(I highly doubt strtext(...) works, it's just something that came to me
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"
  #20   Spotlight this post!  
Unread 26-01-2004, 16:16
Jeremy_Mc's Avatar
Jeremy_Mc Jeremy_Mc is offline
GitHubber
no team
Team Role: Mentor
 
Join Date: Feb 2002
Rookie Year: 2002
Location: Orlando, FL
Posts: 496
Jeremy_Mc will become famous soon enoughJeremy_Mc will become famous soon enough
Re: NRG Code Repository

Quote:
Originally Posted by Raven_Writer
I'm not excellent in PHP, but I'm pretty sure there's a way to search for certain strings, and if it's found, just color-code it. Kinda like:

PHP Code:
$text strtext("$filename");
 
if(
$text){
  
explode("void""<font color='#0000FF'>void</a>");

(I highly doubt strtext(...) works, it's just something that came to me
Why are you using explode?

Check http://us3.php.net/manual/en/function.eregi-replace.php

You have to know regular expressions, but it's the quickest and most flexible way to do it.

Just search for the keywords and replace them when you read the file into a variable...it shouldn't be too tough.
__________________
GitHub - Collaborate on code, documentation, etc. - http://github.com
  #21   Spotlight this post!  
Unread 26-01-2004, 16:18
Guest
 
Posts: n/a
Re: NRG Code Repository

Someone give me a list of keywords, and I'll use PCRE's to do the highlighting.
  #22   Spotlight this post!  
Unread 26-01-2004, 16:19
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Re: NRG Code Repository

Quote:
Originally Posted by Jeremy_Mc
Why are you using explode?

Check http://us3.php.net/manual/en/function.eregi-replace.php

You have to know regular expressions, but it's the quickest and most flexible way to do it.

Just search for the keywords and replace them when you read the file into a variable...it shouldn't be too tough.
I was just using what I knew :\

I haven't done PHP lately (for about 6 months), so most is gone.

<Edit>:
SilverStar: int, unsigned, char, double, float, void, return

There's prob. others, but those are the ones I know MPLAB uses.
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"
  #23   Spotlight this post!  
Unread 26-01-2004, 16:22
echos's Avatar
echos echos is offline
Jack of all trades
#1125
Team Role: Programmer
 
Join Date: Dec 2003
Location: San Diego, CA
Posts: 61
echos will become famous soon enough
Send a message via ICQ to echos Send a message via AIM to echos Send a message via MSN to echos Send a message via Yahoo to echos
Re: NRG Code Repository

here is a pre made program that does syntax highlighting, its free...

http://www.hotscripts.com/Detailed/10998.html
__________________

Entity Hosting Staff
http://www.entityhosting.com/
  #24   Spotlight this post!  
Unread 26-01-2004, 16:31
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Re: NRG Code Repository

When I tried editing my boolean entry, it said "The page your are looking for cannot be found. Check the address or try again later." when I clicked on "Update"
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"
  #25   Spotlight this post!  
Unread 26-01-2004, 16:41
Guest
 
Posts: n/a
Re: NRG Code Repository

everything is done, except C code highlighting...

[edit]
I'm writing my own C/C++ code highlighter.
[/edit]

Last edited by SilverStar : 26-01-2004 at 16:49.
  #26   Spotlight this post!  
Unread 26-01-2004, 17:03
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Re: NRG Code Repository

Quote:
Originally Posted by SilverStar
everything is done, except C code highlighting...

[edit]
I'm writing my own C/C++ code highlighter.
[/edit]
Cool. I hope it all works well.
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"
  #27   Spotlight this post!  
Unread 26-01-2004, 17:14
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
Re: NRG Code Repository

the function in php that was mentioned for syntax highlighting is highlight_string() - this automatically adds syntax highlighting for a string of PHP code. (similar but not the same as C)
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)
  #28   Spotlight this post!  
Unread 26-01-2004, 17:17
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Re: NRG Code Repository

One thing though. Please don't do the PHP-style orange commenting. It's very bad to have a light-on-light color scheme.

If you want, here's how VC++ does it:

keywords: blue (#0000FF)
- int, void, char, unsigned, return

processor directives: green (#00FF00)
- #define, #else, #ifndef

comments: green (#00FF00)
- /* */, //
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"
  #29   Spotlight this post!  
Unread 26-01-2004, 17:29
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
Re: NRG Code Repository

i'm guessing that the custom syntax highlighting is currently a work in progress, seeing as right now is coloring most of my code pink
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)
  #30   Spotlight this post!  
Unread 26-01-2004, 18:06
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: NRG Code Repository

Quote:
Originally Posted by Raven_Writer
If you want, here's how VC++ does it:

keywords: blue (#0000FF)
- int, void, char, unsigned, return

processor directives: green (#00FF00)
- #define, #else, #ifndef

comments: green (#00FF00)
- /* */, //
(Sorry, I'm looking at MPLAB, I don't have MSVC++ on this machine )

MPLAB does Proc. Directives blue, and I've seen them purple, too.
Keywords are bold.
Constants are a slightly lighter green then the comments.
Symbols are gray ({} > < = ; etc.)
Strings are blue BUT NOT BOLD!

The colors (and purposes) are below:
  • 000000 Default
    2121B5 Strings, Hex
    2121CE Keywards, Processor directives
    218C21 Numbers
    296B52 Comments
    848484 Symbols
    FF0000 Errors
    FFFFFF Background

I'd post the image, but I can't attach (or can't find the button)

Would it be possible (sometime in the future) to put the coloring specifics in the User CP?
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is your most prefered programming language? Hailfire Programming 156 19-01-2005 21:42
InfraRed autonomous code ... mtrawls Programming 1 11-01-2004 00:25
Autonomous code PBoss Programming 7 14-01-2003 15:29
Does your team use the Default code. Jeff McCune General Forum 2 09-01-2003 14:46
Patent source code? Kyle Fenton Chit-Chat 3 20-10-2001 17:53


All times are GMT -5. The time now is 20:16.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi