'sub' is an exact synonym of 'void' IIRC. 'sub' is simply an inheritance from NQC, which did not have 'void'.mattallen37 wrote:I think sub is basically identical in function to void, but it is not as efficient, IIRC.
LEGO mindstorms NXT power programming: robotics in C
-
- Posts: 73
- Joined: 29 Sep 2010, 12:05
Re: LEGO mindstorms NXT power programming: robotics in C
Regards, Morton
Re: LEGO mindstorms NXT power programming: robotics in C
Everyone uses "void", because that's what C/C++ have.m-goldberg wrote:'sub' is an exact synonym of 'void' IIRC. 'sub' is simply an inheritance from NQC, which did not have 'void'.mattallen37 wrote:I think sub is basically identical in function to void, but it is not as efficient, IIRC.
No one uses "sub" which used to be part of NQC, and is "deprecated".
Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE
Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
Re: LEGO mindstorms NXT power programming: robotics in C
Thanks again;
Thanks,
B2O.
Yes, I meant the file system on the NXT. You can explain it, and I'll see (Because as I said, I don't make a program without it).mattallen37 wrote: Well, then please explain what you mean by "files". do you mean the general concept of files on a computer? If you are referring to the file system on the NXT (reading and writing files with an NXC program), then I don't think you are ready to try to understand how to do it.
Thanks,
B2O.
B2O productions are the best for the best.
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: LEGO mindstorms NXT power programming: robotics in C
As far as the whole thing with sub vs. void, I am sure there was SOME reason that void is the better one (not just because of being "standard").
In regard to the file system, I don't know a whole lot (I have only used it in maybe 10 or so simple cases). To post any example, I'll have to wait until I am using the computer that I program on.
In regard to the file system, I don't know a whole lot (I have only used it in maybe 10 or so simple cases). To post any example, I'll have to wait until I am using the computer that I program on.
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: LEGO mindstorms NXT power programming: robotics in C
We can argue about it all day, but I know John once said:mattallen37 wrote:As far as the whole thing with sub vs. void, I am sure there was SOME reason that void is the better one (not just because of being "standard").
sub exists as backward compatibility with NQC. It's probably defined like this:John Hansen when he was apprenticed to Yoda wrote:Void is emptiness. The alias of void is sub. Nothing more, but the remnants of NQC.
Code: Select all
#define sub void
Code: Select all
typedef void sub
Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE
Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
Re: LEGO mindstorms NXT power programming: robotics in C
sub == void. Simply in NXC for the sake of NQC familiarity/compatibility.
If you want to write code that is as like C as NXC can be then you should not use sub.
John Hansen
If you want to write code that is as like C as NXC can be then you should not use sub.
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: LEGO mindstorms NXT power programming: robotics in C
Okay, thanks for clarifying.
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Who is online
Users browsing this forum: Ahrefs [Bot] and 0 guests