Mail Archives: djgpp/1997/10/12/17:16:32
From: | Chris Frolik <frolikcc AT indy DOT net>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | A simple program
|
Date: | Sun, 12 Oct 1997 15:30:04 -0500
|
Organization: | IndyNet - Indys Internet Gateway (info AT indy DOT net)
|
Lines: | 29
|
Message-ID: | <3441334C.49DD@indy.net>
|
NNTP-Posting-Host: | ip75-234.ts.indy.net
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
I tried compiling/running the following program:
/**************** TEST.C *******************/
#include <stdio.h>
int main(int argc, char *argv[])
{
int i;
for (i=0 ; i<argc ; i++) printf("%s ", argv[i]);
printf("\n");
return 0;
}
/************************************************/
Then I tried typing the following command line:
test *.c
And I didn't get the output I expected -- It printed out all of the
files in the directory with the extension ".C". I can see how this can
be useful -- but what if I want to pass "*.c" literally as the first
argument? (which I want to be able to do in a program I wrote). It
seems to me this is impossible to do. Is this because of DJGPP, or the
way DOS passes the command line?
-Chris Frolik
frolikcc AT indy DOT net
- Raw text -