Message-ID: <330D6762.27DB@ro.com> Date: Fri, 21 Feb 1997 03:14:10 -0600 From: Killion Reply-To: killion AT ro DOT com Organization: CorbinSoft MIME-Version: 1.0 To: mharris AT blackwidow DOT saultc DOT on DOT ca CC: opendos AT mail DOT tacoma DOT net Subject: Re: [opendos] [OpenDOS] Wishlist part 2 References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-opendos AT mail DOT tacoma DOT net Precedence: bulk mharris AT blackwidow DOT saultc DOT on DOT ca wrote: > > 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 I like the idea of smart conditions in the IF statement, but my error occured using standard syntax (as outlined in DOSBOOK). I'm rewriting the code that caused the error, and will UL it to the list. Killion