TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Paul Edwards
from: Kieran Haughey
date: 1996-01-14 09:03:40
subject: ..argv

On 11 Jan 96 22:36, Paul Edwards wrote to Kieran Haughey:

Hi Paul,

KH>>> I was accessing varibles of the seperate argv's by using
*(*argv).. and 
KH>>> found that if I did a plain argv++ it would only goto the
next character 
KH>>> in argv, not the next array element...

PE>> Someone's telling porkies!  Show the code (small), and insert a 
PE>> printf("%p", argv); before and after the increment, and then
PE>> apologize for telling porkies.  Fair enough?  BFN.  Paul.

KH>> Well I haven't checked it before or after the increment.. but it is 
KH>> working for me.. 

PE> My comment was in reference to the above comment, where you claim
PE> that argv++ doesn't work.

Ah.. sorry, I didn't mean that it didn't work, I just mean't that it didn't
work the way I wanted it to.. :)

KH>>         *(argv++); /* if I replace this with argv++ it doesn't work.. */
KH>>                    /* btw, this it the line it gives the warning on */

KH>> I should also mention that this function WORKS :).. I use it in
Dupey :).. 
KH>> and Dupey wouldn't accept command line config definition :)..

KH>> Now where am I supposed to have been telling porkies?.. 

PE> In the comment above, saying that argv++ doesn't work.  It DOES.
PE> Try replacing *(argv++) with argv++ and then atone at once!

I originally used argv++, but it didn't goto the next member of the array,
it went to the next character not the next member.. and I use it in a
function which checks to see if there is something on the command line
which isn't a switch, ie. a config file name..  you've gotta remember that
the switches I use are three characters.. ie /df, as I said before.. I
tried argv++, but it just moved onto the next character in the present
member, but just for arguements sake I'll try it in Dupey just to see what
the results are like :).. and I don't think they will be to favorable..

 My Sincerest apologies.. I originally thought that argv++
didn't goto the next member of the array because I was using the IDE
debugger to check the values.. :).. I just tried printing each of the
values and it works.. :).. 

Originally I was wondering why it worked in your getopts but didn't seem to
in my function :)..

 ÿ
Cheers,
Kieran

3:711/413.17{at}fidonet
@EOT:

--- MsgedSQ 3.30
* Origin: -=> The Last Stand Against Sanity <=- (3:711/413.17)
SEEN-BY: 50/99 620/243 623/630 711/401 409 410 413 420 423 430 510 808 809
SEEN-BY: 711/932 934 712/515 713/888 714/906 800/1 7877/2809
@PATH: 711/413 808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.