delorie.com/archives/browse.cgi   search  
Mail Archives: opendos/1997/02/15/10:54:37

From: mharris AT blackwidow DOT saultc DOT on DOT ca
Date: Sat, 15 Feb 1997 08:41:03 -0500 (EST)
Reply-To: mharris AT blackwidow DOT saultc DOT on DOT ca
To: Killion <killion AT ro DOT com>
cc: opendos AT mail DOT tacoma DOT net
Subject: Re: [opendos] [OpenDOS] Wishlist part 2
In-Reply-To: <3305A296.79D2@ro.com>
Message-ID: <Pine.LNX.3.95.970215082041.1839A-100000@capslock.com>
Organization: Total disorganization.
MIME-Version: 1.0
Sender: owner-opendos AT mail DOT tacoma DOT net

On Sat, 15 Feb 1997, Killion wrote:

> > > While we're in that ballpark, I'd like to see SET supported by IF.
> > 
> > How so?
> > 
> > IF "%VARIABLE" != "" THEN ...
> > 
> > That works for me.  Or is this not what you meant?
> > 
> 
> I'm looking for something like this:
> 
> IF _CONDITION_ == _TRUE_ THEN SET _ENV_VAR_=_VALUE_
> 
> OpenDOS gives me an error when I try to use the above syntax. I can get
> IF to use GOTO, ECHO, and MD with no problems, but it just doesn't like
> SET. Now that I'm looking at it (DOSBook), the explanation of IF's logic
> contains a critical flaw. 
> 
> 	...is executed when the condition is true (or true, if you specify IF
> NOT)...
> 
> I apologize if I seem to be nitpicking.

No, you're not nitpicking.  I think I know what you mean now, but
could you give me an actual example piece of code?  Perhaps you
could illustrate it with an example in C.  ie:

if(CONDITION)
{
	set VAR=whatever;
}

In other words, you want IF to allow different conditions to be
tested for instead of the dumb behavior it has now?

If this is what you want, 4DOS can do it.  Specify what exactly
you mean by what CONDITION is.  A single value?  An expression
such as "x <= y", "x > 34"? 4DOS can do these things directly,
and also can do IFF THEN ELSEIF ELSE ENDIFF blocks, GOSUB's, etc.

I suspect that COMMAND.COM will turn into 4DOS when the sources
are released so use 4DOS till then.  Consider this a 4DOS
advocate's plug for it.

4DOS can be found at:  ftp://ftp.std.com/vendors/jpsoft

Enjoy!

Mike A. Harris        |             http://blackwidow.saultc.on.ca/~mharris
Computer Consultant   |    My webpage has moved and my address has changed.
My dynamic address: http://blackwidow.saultc.on.ca/~mharris/ip-address.html
mailto:mharris AT blackwidow DOT saultc DOT on DOT ca

The Art Bell homepage: http://www.artbell.com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019