Go to Post Really let's not remove the best part of the games and that is the human interaction with the robots. Humans are much more adaptable and interesting when it come to problem solving. - Steve W [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 23-09-2005, 09:21
jazzsaxman1988's Avatar
jazzsaxman1988 jazzsaxman1988 is offline
Registered User
AKA: Hal
#0404 (Distant Rage)
Team Role: Programmer
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Dinwiddie. VA
Posts: 9
jazzsaxman1988 is an unknown quantity at this point
Send a message via AIM to jazzsaxman1988 Send a message via MSN to jazzsaxman1988 Send a message via Yahoo to jazzsaxman1988
Lightbulb Re: Autonomous Code trouble

Quote:
Originally Posted by EricS-Team180
I ask my students to add a 2 letter prefix to variable names in order to keep the different scopes and types of variables sorted out. We don't touch the IFI variables, just the custom code we create...but that helps to identify IFIs code, as well:

First character:
t - type
m -data member of class, struct or
union (non-static)
s - static class scope
g - global scope
a - argument, non-reference
r - reference argument
l - auto local (temporary storage)

Second character:
n - number/scalar, non-enumeration
e - enumeration scalar
s - struct
u - union
a - array
p - pointer

So if we wanted to add a static int "t", it'd be snt and snT. If global, gnt or gnT or if used solely in a function lnt or lnT. It looks a bit awkward, but it really helps me when I'm code reading and debugging.

Eric
So yeah, good example of using the basic idea behind Hungarian notation. It's good that you make your students do it, it makes for much easier code reading, and it keeps you from ripping your hair out trying to fix things. The code for FRC isn't so bad, but when you get into Windows programming it really makes a difference.
__________________
So he was standing there, surrounded by sinners, blasphemers, and the devil himself, and he thought to himself, "Well, no one's perfect..."
  #17   Spotlight this post!  
Unread 21-01-2006, 10:36
The yellowdart's Avatar
The yellowdart The yellowdart is offline
Registered User
FRC #1506 (Metal Muscle)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Oakland County
Posts: 22
The yellowdart has a little shameless behaviour in the past
Re: Autonomous Code trouble

There is a way to make MPLAB recognize that......I'll look it up and let ya know how to do it.
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
Best Way To Insert Autonomous Code Into Default then load help.? :-)? gemccnp Programming 2 05-02-2005 18:58
Team THRUST - Kevin's Code and Camera Code Combine Chris_Elston Programming 3 31-01-2005 22:28
heres the code. y this not working omega Programming 16 31-03-2004 15:18
InfraRed autonomous code ... mtrawls Programming 1 11-01-2004 00:25


All times are GMT -5. The time now is 01:12.

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