🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #2090

Enhancement Q: argc, argv, _argc, _argv, __argc, __argv

#2090
From: david
Date: Sun, 01 Oct 1995 14:36
29 lines
1713 bytes
Some compilers have external symbols _argc and _argv that act
similarly to the argc and argv typically found in main functions.

Because these are useful at constructor time before main
gets invoked, the question/request I have is whether the standard
could be slightly modified to specify two pairs (or triplets if one
wants to include env) of externals:

   _argc,  _argv being        const equivalents of argc and argv;
__argc, __argv being non-const.

This way, constructors could examine and modify the values
and other constructors (or general functions) could have access
to either the processed or unprocessed values.

   This way, programs could have their cake and eat it two,
at almost no cost to compiler writers, one would think.

   Is there any significant problem with this, which I request
after many cases of having to work around the omission?

   Thanks,
   David E. Miller
   david@atl-intl.com


[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <david.172.01511565@atl-intl.com>
Path: arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamage

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamage
From: david@atl-intl.com
Newsgroups: comp.std.c++
Subject: Enhancement Q: argc, argv, _argc, _argv, __argc, __argv
Date: 1 Oct 1995 14:36:05 GMT
Organization: Interport Communications Corp.
Approved: clamage@eng.sun.com (comp.std.c++)
Message-ID: <david.172.01511565@atl-intl.com>
NNTP-Posting-Host: taumet.eng.sun.com
Content-Type: text
X-Nntp-Posting-Host: atlintl.port.net
X-Newsreader: Trumpet for Windows [Version 1.0 Rev B final beta #1]
Content-Length: 917
Originator: clamage@taumet