Go to Post The closest thing to "Senior Mentor" we have is "Team Grandma". :) - Alan Anderson [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #14   Spotlight this post!  
Unread 08-02-2009, 18:58
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Understanding the Source code

the ## is the preprocessor concat symbol

so in S(label, offset, message) const int wpi_v_##label = offset; const char *wpi_s_##label = message ;


if you say S(MyLabel, 1,"Message of mine")
it will replace the vars so it looks like this


const int wpi_v_MyLabel = 1;
const char *wpi_s_MyLabel = "Message of mine";
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
 


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
need help understanding c code in robotdrive mahmosh C/C++ 14 16-01-2009 08:56
i downloaded the source code, now what do i do? programmr Programming 2 12-12-2008 14:39
Source code for the Easy C Pro library functions? bobpskier Programming 3 05-02-2007 21:39
[FVG]: Source Code SilverStar FIRST-related Organizations 5 24-08-2004 14:28
Patent source code? Kyle Fenton Chit-Chat 3 20-10-2001 17:53


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

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