Go to Post It's what this is all about. Making dreams happen. - Astronouth7303 [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-08-2009, 06:58 PM
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
Reply


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


All times are GMT -5. The time now is 09:26 AM.

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