[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:15 Dec 2004 13:21:09 -0000 
Subject:Re: sysobey 
From:David Young 
Volume-ID: 

On Wed, 15 Dec 2004, english tutor wrote:

> i tried this in windows and linux  but  it crashes
> even though in linux it loads...  how do i resolve
> this  
> 
> define commander(command);
> 
> if command matches ([open cdplayer]) then
> sysobey('cdplayer.exe') -> response;
> else [unable to comply] =>
> endif;
> enddefine;
> 
> tried sysobey('date')  it displayed but still kick me
> out of ved 
> 
> error message is ... 
> mishap -ste: stacj enpty (missing argument? missing
> result?)
> doing : commander pop_setpop_compiler runproc runproc

The problem is, I think, that SYSOBEY does not return a result so there
is nothing to assign to RESPONSE - hence the "stack empty" mishap.

If you do sysobey('date') the date is printed (on my system in the
Pop-11 base window - the one with the : prompt). However, if you use
SYSOBEY nothing will ever be returned on the stack.

It doesn't look from your code as if you need to use information
returned from cdplayer, since you don't make any use of RESPONSE -
though I guess it could be a global variable which is used elsewhere. If
that's the case, just omit "-> response" from your code.

If you do need information back from cdplayer, i.e. you want what it
would print to be captured as a string in your Pop-11 program, then you
need to use a pipe. See PIPEIN in REF * SYSUTIL for more information.

David