To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 8249
8248  |  8250
Subject: 
Re: lsynthcp community development project setup on sourceforge
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 21 Jan 2003 02:02:19 GMT
Viewed: 
1104 times
  
In lugnet.cad.dev, Kevin Clague writes:
In lugnet.cad.dev, Ross Crawford writes:
In lugnet.cad.dev, Kevin Clague writes:
I think that positional parameters may
be a real hassle.  How do you feel about named parameters
(FILENAME="foo.dat", LENGTH=20, UNITS=CM)?

What about getopt() style parameters, eg:

-f foo.dat -l 20 -u cm
--filename foo.dat --length 20 --units cm

Much better!  I've been programming on Windows too much lately (isn't any
amount too much? ;^)

Whoah, wait a minute!  I like getopt() as much as anyone, but I
thought we were talking about something to go *inside* the file on
the SYNTH BEGIN line(s), not necessarily on the command line.  Units
may be universal for all synthesized parts in a file, but I think
the length and name are best tied to a specific SYNTH part in the
file.  So how about this?  Global defaults are set on the command
line with getopt() style params.  These can be overridden for each
synthesized part by named parameters on the SYNTH BEGIN line of
each synthesized part.

I'd like to see something like --filename --outputfile --subfiles
--onlysynthparts in addition to the length and units on the cmd line.
I'm not sure how to work the default input and output.  Perhaps
make it stdin and stdout unless overridden by -f or -o.  I guess
for backwards compatibility I'd also allow the first cmdline param
without a "-" to be the input file, and the 2nd without a "-" to
be the output file.  Informational messages should go to stderr.

The --subfiles option would tell the program to copy the input file
to the output file as is, and dump the synthesized parts to either
numbered subfiles, or files named by the "NAME=" option.

The --onlysynthparts option would tell the program to skip everything
but the new synthesized parts.  These would either go to stdout, the
named outputfile, or individual subfiles, depending on the other
command line options.

Does this make sense?

Don



Message has 1 Reply:
  Re: lsynthcp community development project setup on sourceforge
 
(...) ;^) Relax, we are talking about both on the command line that starts the program, as well as on the LDraw meta-commands that start synthesis of a specific part. Notice he said getopt() style parameters, not getopt() to get the parameters. (...) (22 years ago, 21-Jan-03, to lugnet.cad.dev)

Message is in Reply To:
  Re: lsynthcp community development project setup on sourceforge
 
(...) Much better! I've been programming on Windows too much lately (isn't any amount too much? ;^) Kevin (...) (22 years ago, 20-Jan-03, to lugnet.cad.dev)

19 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