Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Tcl_ParseArgv
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  12 messages - Expand all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Chris Nelson  
View profile  
 More options Apr 8 2002, 3:54 pm
Newsgroups: comp.lang.tcl
From: Chris Nelson <ch...@pinebush.com>
Date: Mon, 08 Apr 2002 15:54:55 -0400
Local: Mon, Apr 8 2002 3:54 pm
Subject: Tcl_ParseArgv
Am I the _only_ one who wants to be able to parse arguments in C without
Tk?  For the second or third time in as many years, I find that I have
code that depends on Tk _ONLY_ to use Tk_parseArgv.  The last thread I
found on groups.google.com ended with a suggestion that I submit a patch
to add Tcl_ParseArgv() based on Tk_ParseArgv(); that was in 1998!  I may
not be desperate enough to do that but I'd like some preliminary
feedback before I go to that trouble.  Is this a useful change?  It is
core bloat?

                                              Chris
--
Never doubt that a small group of thoughtful, concerned citizens
can change the world.  Indeed, it's the only thing that ever has.
                                                     --Margaret Mead


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Don Porter  
View profile  
 More options Apr 8 2002, 4:17 pm
Newsgroups: comp.lang.tcl
From: Don Porter <d...@email.nist.gov>
Date: 8 Apr 2002 20:17:55 GMT
Local: Mon, Apr 8 2002 4:17 pm
Subject: Re: Tcl_ParseArgv

In article <3CB1F58F.3E17...@pinebush.com>, Chris Nelson wrote:
> Am I the _only_ one who wants to be able to parse arguments in C
> without Tk?

No, I like that idea too.

> Is this a useful change?  It is core bloat?

I think it's useful.  It's similar to Tcl_WrongNumArgs().  A common
function that almost all extensions need, and if Tcl itself provides
one routine for it, then extensions are better standardized.

A TIP to move it from Tk to Tcl shouldn't need to be very long since we
all know the interface; it's just a move.

--
| Don Porter          Mathematical and Computational Sciences Division |
| donald.por...@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Don Porter  
View profile  
 More options Apr 8 2002, 4:22 pm
Newsgroups: comp.lang.tcl
From: Don Porter <d...@email.nist.gov>
Date: 8 Apr 2002 20:22:52 GMT
Local: Mon, Apr 8 2002 4:22 pm
Subject: Re: Tcl_ParseArgv

> In article <3CB1F58F.3E17...@pinebush.com>, Chris Nelson wrote:
>> Am I the _only_ one who wants to be able to parse arguments in C
>> without Tk?
Don Porter wrote:
> A TIP to move it from Tk to Tcl shouldn't need to be very long since we
> all know the interface; it's just a move.

Well, that's not quite right, because Tk_ParseArgv() takes a Tk_Window
argument, so it will need to change a bit in the move.

--
| Don Porter          Mathematical and Computational Sciences Division |
| donald.por...@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Things we all need (was: Tcl_ParseArgv)" by Cameron Laird
Cameron Laird  
View profile  
 More options Apr 8 2002, 5:00 pm
Newsgroups: comp.lang.tcl
From: cla...@starbase.neosoft.com (Cameron Laird)
Date: 8 Apr 2002 16:09:13 -0500
Local: Mon, Apr 8 2002 5:09 pm
Subject: Things we all need (was: Tcl_ParseArgv)
In article <slrnab3uni.f18....@clover.cam.nist.gov>,
Don Porter  <d...@email.nist.gov> wrote:
                        .
                        .
                        .
>I think it's useful.  It's similar to Tcl_WrongNumArgs().  A common

                        .
                        .
                        .
Oo, oo:  Tcl_WrongNumArgs().  That's another
one that's occupied my thoughts.

... though not enough to TIP ...
--

Cameron Laird <Came...@Lairds.com>
Business:  http://www.Phaseit.net
Personal:  http://starbase.neosoft.com/~claird/home.html


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Don Porter  
View profile  
 More options Apr 8 2002, 5:23 pm
Newsgroups: comp.lang.tcl
From: Don Porter <d...@email.nist.gov>
Date: 8 Apr 2002 21:23:03 GMT
Local: Mon, Apr 8 2002 5:23 pm
Subject: Re: Things we all need (was: Tcl_ParseArgv)

Cameron Laird wrote:
> Oo, oo:  Tcl_WrongNumArgs().  That's another
> one that's occupied my thoughts.
> ... though not enough to TIP ...

???  In what way does the Tcl_WrongNumArgs() interface need revision?

--
| Don Porter          Mathematical and Computational Sciences Division |
| donald.por...@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Tcl_ParseArgv" by George A. Howlett
George A. Howlett  
View profile  
 More options Apr 8 2002, 8:20 pm
Newsgroups: comp.lang.tcl
From: "George A. Howlett" <g...@siliconmetrics.com>
Date: Tue, 09 Apr 2002 00:20:40 GMT
Local: Mon, Apr 8 2002 8:20 pm
Subject: Re: Tcl_ParseArgv

Chris Nelson <ch...@pinebush.com> wrote:
> Am I the _only_ one who wants to be able to parse arguments in C without
> Tk?  For the second or third time in as many years, I find that I have
> code that depends on Tk _ONLY_ to use Tk_parseArgv.  The last thread I
> found on groups.google.com ended with a suggestion that I submit a patch
> to add Tcl_ParseArgv() based on Tk_ParseArgv(); that was in 1998!  I may
> not be desperate enough to do that but I'd like some preliminary
> feedback before I go to that trouble.  Is this a useful change?  It is
> core bloat?

Isn't it easier to process command line arguments in Tcl?  

Tk-based applications are somewhat special because they have a
standard set of options used for all Tk applications.  Many of the
switches perform one-time initialization actions that have to be done
before the main window exists (-name, -colormap, -visual, -display,
etc.) that forces it to be in C.

I've never used tcllib's cmdline package (I have a set of my own
procedures). Is it wanting for features or convenience?  

--gah


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Nelson  
View profile  
 More options Apr 10 2002, 7:55 am
Newsgroups: comp.lang.tcl
From: Chris Nelson <ch...@pinebush.com>
Date: Wed, 10 Apr 2002 07:55:25 -0400
Local: Wed, Apr 10 2002 7:55 am
Subject: Re: Tcl_ParseArgv

"George A. Howlett" wrote:

> Chris Nelson <ch...@pinebush.com> wrote:
> > Am I the _only_ one who wants to be able to parse arguments in C without
> > Tk?  For the second or third time in as many years, I find that I have
> > code that depends on Tk _ONLY_ to use Tk_parseArgv.  The last thread I
> > found on groups.google.com ended with a suggestion that I submit a patch
> > to add Tcl_ParseArgv() based on Tk_ParseArgv(); that was in 1998!  I may
> > not be desperate enough to do that but I'd like some preliminary
> > feedback before I go to that trouble.  Is this a useful change?  It is
> > core bloat?

> Isn't it easier to process command line arguments in Tcl?
> ...

We're looking to parse arguments in C in our AppInit function.

                                         Chris
--
The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
lvirden  
View profile  
 More options Apr 10 2002, 9:43 am
Newsgroups: comp.lang.tcl
From: lvir...@yahoo.com
Date: 10 Apr 2002 13:33:28 GMT
Local: Wed, Apr 10 2002 9:33 am
Subject: Re: Tcl_ParseArgv

According to George A. Howlett <g...@siliconmetrics.com>:

:Chris Nelson <ch...@pinebush.com> wrote:

:> Am I the _only_ one who wants to be able to parse arguments in C without
:> Tk?  

:Isn't it easier to process command line arguments in Tcl?  

Not if most of your app is in C...

--
"I know of vanishingly few people ... who choose to use ksh." "I'm a minority!"
<URL: mailto:lvir...@cas.org> <URL: http://www.purl.org/NET/lvirden/>
Even if explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
George A. Howlett  
View profile  
 More options Apr 10 2002, 11:24 pm
Newsgroups: comp.lang.tcl
From: "George A. Howlett" <g...@siliconmetrics.com>
Date: Thu, 11 Apr 2002 03:24:35 GMT
Local: Wed, Apr 10 2002 11:24 pm
Subject: Re: Tcl_ParseArgv

lvir...@yahoo.com wrote:
> According to George A. Howlett <g...@siliconmetrics.com>:
> :Chris Nelson <ch...@pinebush.com> wrote:
> :> Am I the _only_ one who wants to be able to parse arguments in C without
> :> Tk?  
> :Isn't it easier to process command line arguments in Tcl?  
> Not if most of your app is in C...

That leads to an interesting question.  What parts of your application
are better in Tcl and what parts in are better in C?

My personal view is that Tcl is great for glue. I take building blocks
written in C or C++ (like the Tk widgets) and wire them together with
Tcl in scripts.  I get the best of both worlds: flexibility and ease
of programming from Tcl, structure and speed from C.

I can take an application written totally in C and replace the main
program with a Tcl script.  The function calls in the main program
become Tcl commands. What this buys me is that I can now rewire my
application in all kinds of interesting ways.  How interesting is a
consequence of the core functionality that each command brings.

So I don't understand how one can write a program with Tcl and C and
*not* write the main in Tcl (including argument parsing).  You're not
taking advantage of what Tcl is best at.  That's just my opinion.

--gah


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andreas Kupries  
View profile  
 More options Apr 11 2002, 2:35 am
Newsgroups: comp.lang.tcl
From: Andreas Kupries <akupr...@shaw.ca>
Date: Thu, 11 Apr 2002 06:35:44 GMT
Local: Thurs, Apr 11 2002 2:35 am
Subject: Re: Tcl_ParseArgv
"George A. Howlett" <g...@siliconmetrics.com> writes:

Your position seems to be similar to

        http://wiki.tcl.tk/ACriticalMindsetAboutPolicy

--
Sincerely,
        Andreas Kupries <akupr...@shaw.ca>
        Join us in Sept. for Tcl'2002: http://www.tcl.tk/community/tcl2002/

        Developer @     <http://www.activestate.com/>
        Private         <http://www.purl.org/NET/akupries/>
--------------------------------------------------------------------------- ----


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Things we all need (was: Tcl_ParseArgv)" by Cameron Laird
Cameron Laird  
View profile  
 More options Apr 11 2002, 7:58 pm
Newsgroups: comp.lang.tcl
From: cla...@starbase.neosoft.com (Cameron Laird)
Date: 11 Apr 2002 19:07:56 -0500
Local: Thurs, Apr 11 2002 8:07 pm
Subject: Re: Things we all need (was: Tcl_ParseArgv)
In article <slrnab42hm.qg7....@clover.cam.nist.gov>,
Don Porter  <d...@email.nist.gov> wrote:
>Cameron Laird wrote:
>> Oo, oo:  Tcl_WrongNumArgs().  That's another
>> one that's occupied my thoughts.
>> ... though not enough to TIP ...

>???  In what way does the Tcl_WrongNumArgs() interface need revision?

                        .
                        .
                        .
Exposure for scripters; that's all I meant.  I end up defining
a local
  proc validated_proc {name number_of_args usage_message args body} {
         ...
  }
It's not that the Tcl side needs C coding, but just deserves
standardization.
--

Cameron Laird <Came...@Lairds.com>
Business:  http://www.Phaseit.net
Personal:  http://starbase.neosoft.com/~claird/home.html


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Don Porter  
View profile  
 More options Apr 11 2002, 8:19 pm
Newsgroups: comp.lang.tcl
From: Don Porter <d...@email.nist.gov>
Date: 12 Apr 2002 00:19:14 GMT
Local: Thurs, Apr 11 2002 8:19 pm
Subject: Re: Things we all need (was: Tcl_ParseArgv)
Don Porter  <d...@email.nist.gov> wrote:

>>???  In what way does the Tcl_WrongNumArgs() interface need revision?
Cameron Laird wrote:
> Exposure for scripters; that's all I meant.  I end up defining
> a local
>   proc validated_proc {name number_of_args usage_message args body} {
>     ...
>   }
> It's not that the Tcl side needs C coding, but just deserves
> standardization.

In Tcl 8.4, the error messages produced by [proc]s when the actual
arguments do not match the formal arguments are consistent with the
messages produced by Tcl_WrongNumArgs().

--
| Don Porter          Mathematical and Computational Sciences Division |
| donald.por...@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »