Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A word of advice 2

Status
Not open for further replies.

VhdlForLife

Programmer
Aug 11, 1999
40
JP
I've noticed that lately there has been a proliferation of student question in the forums. These are rather obvious posts since they have very specific application requirements and format. Personally I think that it is okay to get help for your college assignments, however, I think that it should only be done as a last resort or only when you have no way of continuing. The help sought after should just be hints or advice on possible avenues of approach. It would really be unfair if the COMPLETE solution is given to these posts! Think of the work that other students would have had to do.<br><br>So here I'm calling for your support to only give strategic help when you see these posts so that the person is helped by the advice you give for the approach. You only cause harm when you reply with a COMPLETE solution since the student would never have learnt to do the assignments. We wouldn't want the next generation (i.e. our future colleague) to be weak in simple program generation. Let's make these forums an even better place!<br><br>Thanks,<br>VhdlForLife
 
I'm not a student.&nbsp;&nbsp;How about just answering the questions?&nbsp;&nbsp;<br><br>I have a new question.&nbsp;&nbsp;I've read many descriptions of the EXECL function but I don't get it!&nbsp;&nbsp;One book defines it this way:<br><br>execl(filename, arg0, [arg1, ...argn, NULL)<br><br>&nbsp;&nbsp;&nbsp;filename = string containing the name of program to execute.<br>&nbsp;&nbsp;&nbsp;arg0 = first string on the command line; normally the name of the program<br>&nbsp;&nbsp;&nbsp;arg1 = next string on the command line with a space in between each arg<br><br>Why are filename and arg0 the same thing.&nbsp;&nbsp;What is their functional difference?&nbsp;&nbsp;<br><br>Thanks for your help?<br>&nbsp;<br>
 
I agree with VhdlForLife &quot;Use the force, Read the Source&quot;<br>You will learn a lot more if you ask someone here for advice as a last resort. Rather than posting as a way of &quot;Taking the easy way out&quot;
 
It looks like the function shells out to the system. The filename doesn't really look like it has to be the same as the name of the program (more like an identifier used when referencing the running applications). arg0 would have to be the actual name of the program you wish to run.
 
Answer to emart.<br><br>The prototype of function execl is :<br><br>int _execl( const char *cmdname, const char *arg0, ... const char *argn, NULL );<br><br>where :<br>cmdname = Path of file to be executed<br><br>arg0, ... argn = List of pointers to parameters<br><br>So when arg0 is nothing but a pointer to the cmdname itself. That is why both the name are same .<br><br>Does this answer your question?<br>Thanx<br>Siddhartha Singh<br><A HREF="mailto:ssingh@aztecsoft.com">ssingh@aztecsoft.com</A>
 
Thanks ssingh for clearing that up. Wouldn't want to mislead the charlesy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top