What is a "Stub"?

Questions about MultiCharts and user contributed studies.
User avatar
RobotMan
Posts: 375
Joined: 12 Jul 2006
Location: Los Altos, California, USA
Has thanked: 31 times
Been thanked: 13 times
Contact:

What is a "Stub"?

Postby RobotMan » 26 Dec 2008

OK, I know you programmers are going to chuckle, but I don't know why PLE colors the reserved word "TradeVolume" as a "Stub". Do you know?

Also, I have looked high and low what the red checkmark means in the status column. I've looked in all the documentation I have and searched this forum. Zip, Zero, Nada info. The indicator compiles with no errors and as far as I can tell, there are no bogus commands.

Thanks!
Attachments
RedCheckMark.jpg
(77.49 KiB) Downloaded 285 times
TradeVolume.jpg
(17.82 KiB) Downloaded 287 times

bowlesj3
Posts: 2180
Joined: 21 Jul 2007
Has thanked: 227 times
Been thanked: 429 times

Postby bowlesj3 » 26 Dec 2008

Below is the website where I found the stub definition as well as the definition below it. I remember writing some of these. It has been a while. I usually did it when I was under pressure and had not finalized my thoughts in a specific function so I wrote a stub. In large projects the systems analyst may not have provided the specifications for the function so the programmer writes a stub so he can continue on programming with the specifications he currently has available. I guess it could be thought of an arm that is partially missing (a stub) and does not have its full functionality.

http://www.bookrags.com/s/

stub.
A stub is a skeleton program or routine used early in the software development process to substitute for a fully functional program that has not been developed yet. Stub programs are temporary sections of programming code that assist in testing interfaces to and from the complete program. Minimal programming code is written in a stub. A stub must contain enough code to be compiled and linked with the other related programs as well as test data values being passed to and from other programs. To do this the stub must include at least the declarations of variables and functions. In addition programmers sometimes include simple functionality or text debugging messages that allow them to view the sequence of logic being executed by the stub. As the development process proceeds, stub functions are replaced one at a time with the real functions. This allows the programmer to isolate errors, improving the quality of development.

User avatar
RobotMan
Posts: 375
Joined: 12 Jul 2006
Location: Los Altos, California, USA
Has thanked: 31 times
Been thanked: 13 times
Contact:

Postby RobotMan » 26 Dec 2008

Thanks, John. Appreciate it.

I guess that the reserved word "TradeVolume" works in Easylanguage but not PowerLanguage. I will experiment more next week when the markets are open.

bowlesj3
Posts: 2180
Joined: 21 Jul 2007
Has thanked: 227 times
Been thanked: 429 times

Postby bowlesj3 » 27 Dec 2008

Hi Bob,

I am not sure that there really is a difference between powerlanguage and easylanguage in MC. I used TS4.0 in 1988 and if I remember correctly there is only EasyLanguage and there was a PowerEditor to do more advanced editing of your EasyLanguage code rather than using only the more simple way of creating simpler EasyLanuage code "using something that would be called a quick editor". The quick editor was just a way of quickly putting together simple systems if I remember correctly. TS-Support does not have a quick editor with its MC.

Obviously the MC compiler must have the smarts to detect when to color each component of the EL text a certain way based upon what it finds during its parsing process. It could be that the "TradeVolume" function (which I don't use by the way) does not meet their full error handling standards yet and the compiler knows this. An other positibility is It may be that they wish to have further data editing built into it that the user would never normally know about unless something went wrong in the input data to it. So they may have put [future work to be done markers] in the code that the compiler knows about and it thus colors the function as a stub as a reminder to them that they have more work to do on it to bring it up to their hoped for specification. I don't know C programming but I am guessing that these markers could be C code comments of a certain type that the C compiler uses. Either way it is a reminder that more work is to be done and is of more direct and immediate interest to TS-Support than the end user.


Return to “MultiCharts”