To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 650
649  |  651
Subject: 
Re: PRGM button - am I missing something?
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Wed, 12 Jan 2000 02:51:09 GMT
Viewed: 
1408 times
  
Ben Jackson schrieb:
From getopt(3) on BSD and other systems:

     When all options have been processed (i.e., up to the first
     non-option argument), getopt() returns -1.

However, from the Linux manpage:

       By default, getopt() permutes the contents of argv  as  it
       scans,  so  that eventually all the non-options are at the
       end.  Two other modes are also implemented.  If the  first
       character  of optstring is `+' or the environment variable
       POSIXLY_CORRECT is set, then option  processing  stops  as
       soon  as  a  non-option  argument  is encountered.

OK, I'll change the docs and examples, then. Too bad, I thought
position-independence very nifty indeed.

Markus.



Message has 1 Reply:
  Re: PRGM button - am I missing something?
 
(...) Yep, the option order was the problem on Windows. getopt does indeed happily ignores any options found after the first non-option. Thanks again! -Jeff p.s. And don't worry, I can take any Windows jabs you have to offer - I've heard 'em all. (...) (25 years ago, 13-Jan-00, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: PRGM button - am I missing something?
 
(...) From getopt(3) on BSD and other systems: When all options have been processed (i.e., up to the first non-option argument), getopt() returns -1. However, from the Linux manpage: By default, getopt() permutes the contents of argv as it scans, so (...) (25 years ago, 12-Jan-00, to lugnet.robotics.rcx.legos)

7 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR