|
Page 1 of 1
|
[ 7 posts ] |
|
Author |
Message |
Ernest3.14
Professor
Joined: Sat May 18, 2013 1:24 pm Posts: 271 Location: Olympia, WA
|
 `void TaskID` data type
What does "void" mean as a data type? I know what a "void" function is, but what does it mean when used as the name for a task? Is it just a string?  Or is it a "void pointer", in which case I can treat it as a string? http://www.robotc.net/wiki/NXT_Function ... #StartTaskOn a slightly related note, is there a way to "fetch" the current task's ID? Line 274* of RobotCIntrinsics.c defines an `nCurrentTask`. Is this what I was looking for? Can I cast it to a "void" and pass it to the task-related functions? *: I'm using RobotC 3.60 due to some weird bugs, so this might not be correct. It's in the section "Read only operating system parameters".
_________________FTC Team 6424, the 'Oly Cow - Chief programmer. FRC Team 4450, Olympia Robotics Federation (ORF). and also quadrotors. Quadrotors!
Last edited by Ernest3.14 on Thu Aug 01, 2013 6:59 pm, edited 1 time in total.
|
Thu Aug 01, 2013 6:40 pm |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: `void TaskID` data type
void means nothing. A void pointer is a pointer to a memory location of an unspecified type. A function with a void return type, returns nothing.
= Xander
_________________| Professional Conduit of Reasonableness| (Title bestowed upon on the 8th day of November, 2013) | My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
Fri Aug 02, 2013 4:23 am |
|
 |
Ernest3.14
Professor
Joined: Sat May 18, 2013 1:24 pm Posts: 271 Location: Olympia, WA
|
 Re: `void TaskID` data type
But, but... What does "void StartTask(void TaskID, const short nTaskPriority)" mean? http://www.robotc.net/wiki/NXT_Function ... #StartTask
_________________FTC Team 6424, the 'Oly Cow - Chief programmer. FRC Team 4450, Olympia Robotics Federation (ORF). and also quadrotors. Quadrotors!
|
Fri Aug 02, 2013 4:00 pm |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: `void TaskID` data type
"void taskID" is the name of the task that you specified in your program: = Xander
_________________| Professional Conduit of Reasonableness| (Title bestowed upon on the 8th day of November, 2013) | My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
Sat Aug 03, 2013 2:02 am |
|
 |
Ernest3.14
Professor
Joined: Sat May 18, 2013 1:24 pm Posts: 271 Location: Olympia, WA
|
 Re: `void TaskID` data type
So it's a string? Function pointer? Doohickey?
_________________FTC Team 6424, the 'Oly Cow - Chief programmer. FRC Team 4450, Olympia Robotics Federation (ORF). and also quadrotors. Quadrotors!
|
Sat Aug 03, 2013 4:06 pm |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: `void TaskID` data type
Yes
_________________| Professional Conduit of Reasonableness| (Title bestowed upon on the 8th day of November, 2013) | My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
Sat Aug 03, 2013 4:42 pm |
|
 |
Ernest3.14
Professor
Joined: Sat May 18, 2013 1:24 pm Posts: 271 Location: Olympia, WA
|
 Re: `void TaskID` data type
Ok. Just making sure.
_________________FTC Team 6424, the 'Oly Cow - Chief programmer. FRC Team 4450, Olympia Robotics Federation (ORF). and also quadrotors. Quadrotors!
|
Sat Aug 03, 2013 8:23 pm |
|
|
|
Page 1 of 1
|
[ 7 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 2 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|