Hi ciao-ers,
does anyone know how to execute a command from within a CIAO session? i want to start JADE from a ciao session using the command
"java jade.Boot -gui"
but i'm not sure how to though i'm told it can be done.
cheers,
doug.
============================================================================== Message: Address: Action: help majordomo(a)clip.dia.fi.upm.es Info. on useful commands subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list <whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ -----------------------------------------------------------------------------
does anyone know how to execute a command from within a CIAO session? i want to start JADE from a ciao session using the command
"java jade.Boot -gui"
I guess what you mean is starting that command from within a Ciao program. Have a look at the 'system' library in the Ciao manual. The system/1, system/2, popen/3, exec/3 and exec/4 predicates do what you want (with different levels of sophistication).
If what you mean is starting it from the Ciao development environment (i.e., within emacs, extended with the ciao 'mode'), then simply start a shell (M-x shell) and type the command within the shell.
Hope this helps.
dnb(a)csd.abdn.ac.uk writes:
Hi ciao-ers,
does anyone know how to execute a command from within a CIAO session? i want to start JADE from a ciao session using the command
"java jade.Boot -gui"
but i'm not sure how to though i'm told it can be done.
The 'system' library includes several predicates to do this. As an example,
% Load the module into the toplevel:
?- use_module(library(system)). Note: module system already in executable, just made visible
yes ?- system('ls -l'). %% Note it _has_ to be an atom total 2292 drwxr-xr-x 2 boris profesor 4096 Feb 19 19:41 CVS -rw-r--r-- 1 boris profesor 996 Feb 14 17:06 Makefile [...lots of junk...]
yes %% If you have to use an string, you must convert it to an atom first ?- atom_codes(Command, "ls -l"), system(Command).atom_codes(Command, "ls -l"), system(Command). total 2292 drwxr-xr-x 2 boris profesor 4096 Feb 19 19:41 CVS -rw-r--r-- 1 boris profesor 996 Feb 14 17:06 Makefile [...again the same junk...]
Command = 'ls -l' ?
Hope this helps.
Cheeers,
MCL
___________________________________________________________ Never hit a man with glasses. Hit him with a baseball bat. ============================================================================== Message: Address: Action: help majordomo(a)clip.dia.fi.upm.es Info. on useful commands subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list <whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ -----------------------------------------------------------------------------
does anyone know how to execute a command from within a CIAO session? i want to start JADE from a ciao session using the command
"java jade.Boot -gui"
I guess what you mean is starting that command from within a Ciao program. Have a look at the 'system' library in the Ciao manual. The system/1, system/2, popen/3, exec/3 and exec/4 predicates do what you want (with different levels of sophistication).
If what you mean is starting it from the Ciao development environment (i.e., within emacs, extended with the ciao 'mode'), then simply start a shell (M-x shell) and type the command within the shell.
Hope this helps.