Subject:
|
Re: Noting gaps in parts sequences
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Mon, 22 Feb 1999 22:00:28 GMT
|
Viewed:
|
1507 times
|
| |
| |
In lugnet.cad.dev, blisses@worldnet.att.net (Steve Bliss) writes:
> > my %brick = ( ' ' => "3005",
> > 'Æ' => "3005-AE",
> > map {$_ => "3005-$_"} ('0'..'9', 'A'..'Z') );
>
> '8' and '9' aren't currently defined.
Oh. OK, then the '0'..'9' would be '0'..'7'. (Any idea why 8 & 9 aren't
defined? Did LEGO forget to include them or has no one gotten around to
DAT-ifying them yet?)
> Also, don't forget to handle other
> undefined characters (maybe the above does this?)
These are handled, and mapped into spaces (plain 3005.dat) brick by:
my @letters = map {$brick{uc($_)} || $brick{' '}} split(//, join(' ', @ARGV));
^^^^^^^^^^^^^^
> > print "0 @ARGV (needs work)\n",
> > "0 File: {part number}.dat\n",
> > "0 Author: {author name}\n",
> > "0 Unofficial Element\n\n";
>
> Could {part number} and {author name} be turned into arguments, as well?
Yeah. They could just be passed as the first argument, surrounded by quotes
on the command line if necessary, and @ARGV in the program would instead
become an array slice split(@ARGV, 2). There'd need to be some usage checks
then too.
> > $ datstart steve bliss
>
> ^ Oops. How'd that $ sneak in there?
Shell prompt. Customary to show when cat'ing a program and then running it.
--Todd
|
|
Message is in Reply To:
| | Re: Noting gaps in parts sequences
|
| (...) '8' and '9' aren't currently defined. Also, don't forget to handle other undefined characters (maybe the above does this?) (...) Could {part number} and {author name} be turned into arguments, as well? Actually, if you have a generic app which (...) (26 years ago, 22-Feb-99, to lugnet.cad.dev)
|
9 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|