1. RE: Re[2]: Now what!? Try to bind, and it won't let me.

> When you use the SET command it only sets the variable for the current
> environment, when you start a new instance of the command interpreter
> (command or cmd under nt/2k/xp) it inherits any current variables but
> any changes you make to variables within it do not affect its
> parents...

Thought it was probably something like this. But.....

> How about using bat files to run .ew and .exw? You could do something
> like this:
> 
> Rename ex.exe and exw.exe to _ex.exe and _exw.exe, Make two batch
> files named ex.bat and exw.bat in your euphoria\bin directory. Put this 
> into ex.bat:
> 
> set EUDIR=D:\EUPHORIA
> D:\EUPHORIA\BIN\_ex.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
> 
> And this into exw.bat:
> 
> set EUDIR=D:\EUPHORIA
> D:\EUPHORIA\BIN\_exw.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
> 
> I assume that would work...

Is this different from running a bat file with just 
set EUDIR=D:\Euphoria
then running exw.exe?

Seems like it would be, because exw.exe is either running under the 
command.com from initial boot, or under it's own instance, but still not 
the one that executes the batch file.

Yep, it worked. Thanks a lot. Now I don't feel like drop-kicking 
everything.

new topic     » topic index » view message » categorize

2. RE: Re[2]: Now what!? Try to bind, and it won't let me.

This is how it works...

<ex.bat>  -- NEW ex.bat command environment created
 set EUDIR=D:\EUPHORIA
 D:\EUPHORIA\BIN\_ex.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
<end of ex.bat> -- ex.bat command environment closed (reverts to 
pre-existing environment)

You can see, that if you move ex.exe out of the batch file, it's no 
longer in that environment, meaning any changes you tried to make to the 
environment with ex.bat will be obsolete.

I would add a path to the batch file though. Otherwise you have will 
have to specify the path do things like this.. "ex 
d:\euphoria\bin\bind.ex my_file.ex blah blah"


Chris

SR.Williamson wrote:
> > When you use the SET command it only sets the variable for the current
> > environment, when you start a new instance of the command interpreter
> > (command or cmd under nt/2k/xp) it inherits any current variables but
> > any changes you make to variables within it do not affect its
> > parents...
> 
> Thought it was probably something like this. But.....
> 
> > How about using bat files to run .ew and .exw? You could do something
> > like this:
> > 
> > Rename ex.exe and exw.exe to _ex.exe and _exw.exe, Make two batch
> > files named ex.bat and exw.bat in your euphoria\bin directory. Put this 
> > into ex.bat:
> > 
> > set EUDIR=D:\EUPHORIA
> > D:\EUPHORIA\BIN\_ex.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
> > 
> > And this into exw.bat:
> > 
> > set EUDIR=D:\EUPHORIA
> > D:\EUPHORIA\BIN\_exw.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
> > 
> > I assume that would work...
> 
> Is this different from running a bat file with just 
> set EUDIR=D:\Euphoria
> then running exw.exe?
> 
> Seems like it would be, because exw.exe is either running under the 
> command.com from initial boot, or under it's own instance, but still not 
> 
> the one that executes the batch file.
> 
> Yep, it worked. Thanks a lot. Now I don't feel like drop-kicking 
> everything.
> 
>

new topic     » goto parent     » topic index » view message » categorize

3. RE: Re[2]: Now what!? Try to bind, and it won't let me.

Thomas Parslow (PatRat) wrote:
> > Good morning.
> 
> > Well, I wish it was.
> 
> > I have found the problem. Windows will not hold an environment variable 
> > unless it's in autoexec.bat, apparently.
> 
> > When I type in SET EUDIR=D:\EUPHORIA at the MS-DOS prompt, EUDIR goes 
> > away as soon as I close the window. I can leave the DOS prompt running, 
> > and EUDIR is not recognized in the Sanity DOS session.
> 
> > Go figure.
> 
> > Anyone know away around this?
> 
> When you use the SET command it only sets the variable for the current
> environment, when you start a new instance of the command interpreter
> (command or cmd under nt/2k/xp) it inherits any current variables but
> any changes you make to variables within it do not affect its
> parents...
> 
> How about using bat files to run .ew and .exw? You could do something
> like this:
> 
> Rename ex.exe and exw.exe to _ex.exe and _exw.exe, Make two batch
> files named ex.bat and exw.bat in your euphoria\bin directory. Put this 
> into ex.bat:
> 
> set EUDIR=D:\EUPHORIA
> D:\EUPHORIA\BIN\_ex.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
> 
> And this into exw.bat:
> 
> set EUDIR=D:\EUPHORIA
> D:\EUPHORIA\BIN\_exw.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
> 
> I assume that would work...
> 
> Thomas Parslow (PatRat)
> E-Mail/Jabber: tom at almostobsolete.net
> ICQ: 26359483
> 
> 

Here's a question...

   I'd like to be able to NOT use a batch file.
For one thing, why can't I do it with EU !?
Two, I'd like to be able to have an intuitive environment setup. I mean, 
being able to change %EUINC% from within the calling program, before it 
includes certain libs. Or, for example, maybe I'm using Karls EU 
interpretter for one project, while my environment is setup for EU 
reg'd. I'd like to be able to specify from within my program which 
ex.exe to use. I would set the %EUDIR% to C:\K_Euphoria.
If I have to use a batch file, that means I have to bother to keep track 
of which ex.exe I need to use. My method would be automatic.

As far as I can tell:
system() -- opens it's own environment
and so does system_exec()

Another question:
   How can I call DOS commands w/o the DOS-box opening? For example, to 
copy or delete a file.

Chris

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu