www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - system("DOS COMMAND PROMPT");

reply jicman <jicman_member pathlink.com> writes:
Greetings!

I've searched though digitalmars.com and I have not found, for D, the options
for system();  Will anyone be so kind as to show me where I can find this info?k

thanks.

josé
Aug 02 2005
parent reply "Regan Heath" <regan netwin.co.nz> writes:
On Tue, 2 Aug 2005 17:14:04 +0000 (UTC), jicman  
<jicman_member pathlink.com> wrote:
 Greetings!

 I've searched though digitalmars.com and I have not found, for D, the  
 options
 for system();  Will anyone be so kind as to show me where I can find  
 this info?k
You mean... import std.stdio; import std.process; void main() { system("dir"); } Regan
Aug 02 2005
parent reply jicman <jicman_member pathlink.com> writes:
Regan Heath says...
On Tue, 2 Aug 2005 17:14:04 +0000 (UTC), jicman  
<jicman_member pathlink.com> wrote:
 Greetings!

 I've searched though digitalmars.com and I have not found, for D, the  
 options
 for system();  Will anyone be so kind as to show me where I can find  
 this info?k
You mean... import std.stdio; import std.process; void main() { system("dir"); }
Yes. Thanks. Where can I read more about these below? |std.process | | int system(char[] command) | Execute command in a command shell. Returns exit status | of command. | | int execv(char[] program, char[][] arguments) | int execve(char[] program, char[][] arguments, char[][] | environment) | | int execvp(char[] program, char[][] arguments) | int execvpe(char[] program, char[][] arguments, char[][] | environment) | Execute program, passing it the arguments and the | environment, returning the exit status. The 'p' versions | of exec search the PATH environment variable setting for | program. josé
Aug 03 2005
parent reply "Regan Heath" <regan netwin.co.nz> writes:
On Wed, 3 Aug 2005 16:25:13 +0000 (UTC), jicman  
<jicman_member pathlink.com> wrote:
 Regan Heath says...
 On Tue, 2 Aug 2005 17:14:04 +0000 (UTC), jicman
 <jicman_member pathlink.com> wrote:
 Greetings!

 I've searched though digitalmars.com and I have not found, for D, the
 options
 for system();  Will anyone be so kind as to show me where I can find
 this info?k
You mean... import std.stdio; import std.process; void main() { system("dir"); }
Yes. Thanks. Where can I read more about these below? |std.process | | int system(char[] command) | Execute command in a command shell. Returns exit status | of command. | | int execv(char[] program, char[][] arguments) | int execve(char[] program, char[][] arguments, char[][] | environment) | | int execvp(char[] program, char[][] arguments) | int execvpe(char[] program, char[][] arguments, char[][] | environment) | Execute program, passing it the arguments and the | environment, returning the exit status. The 'p' versions | of exec search the PATH environment variable setting for | program.
Looking in std.process I note that most of these are simply wrappers around the C function calls of the same (or similar) name. So, I'd look for some documentation on those C functions eg. man pages, or msdn, or both. Regan
Aug 03 2005
parent jicman <jicman_member pathlink.com> writes:
Oh, ok...  thanks.

Regan Heath says...
On Wed, 3 Aug 2005 16:25:13 +0000 (UTC), jicman  
<jicman_member pathlink.com> wrote:
 Regan Heath says...
 On Tue, 2 Aug 2005 17:14:04 +0000 (UTC), jicman
 <jicman_member pathlink.com> wrote:
 Greetings!

 I've searched though digitalmars.com and I have not found, for D, the
 options
 for system();  Will anyone be so kind as to show me where I can find
 this info?k
You mean... import std.stdio; import std.process; void main() { system("dir"); }
Yes. Thanks. Where can I read more about these below? |std.process | | int system(char[] command) | Execute command in a command shell. Returns exit status | of command. | | int execv(char[] program, char[][] arguments) | int execve(char[] program, char[][] arguments, char[][] | environment) | | int execvp(char[] program, char[][] arguments) | int execvpe(char[] program, char[][] arguments, char[][] | environment) | Execute program, passing it the arguments and the | environment, returning the exit status. The 'p' versions | of exec search the PATH environment variable setting for | program.
Looking in std.process I note that most of these are simply wrappers around the C function calls of the same (or similar) name. So, I'd look for some documentation on those C functions eg. man pages, or msdn, or both. Regan
Aug 03 2005